add wrapper platform field

This commit is contained in:
Jacob Nguyen
2023-04-15 12:05:14 -05:00
parent 89bb50794b
commit f02bbbf54e
3 changed files with 5 additions and 27 deletions

View File

@@ -1,10 +1,11 @@
import { Context } from "../structures/context";
enum DispatchType {
Websocket,
Serverless
}
type PlatformStrategy =
export type PlatformStrategy =
| WebsocketStrategy
| ServerlessStrategy;
@@ -13,10 +14,8 @@ interface WebsocketStrategy {
interactionCreate: string;
messageCreate: string;
ready: string;
}
interface ServerlessStrategy {
type: DispatchType.Serverless;
}

View File

@@ -1,4 +1,5 @@
import type { Dependencies } from '../../types/handler';
import { PlatformStrategy } from '../platform/strategy';
/**
* @since 1.0.0
@@ -6,6 +7,7 @@ import type { Dependencies } from '../../types/handler';
* @typedef {object} Wrapper
*/
interface Wrapper {
readonly platform: PlatformStrategy;
readonly defaultPrefix?: string;
readonly commands: string;
readonly events?: string;