mirror of
https://github.com/sern-handler/handler
synced 2026-06-16 12:52:15 +00:00
add wrapper platform field
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user