mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
feat: make command modules return Awaitable void | unknown
This commit is contained in:
10597
package-lock.json
generated
10597
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,6 @@
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"format": "eslint src/**/*.ts --fix",
|
||||
"release": "standard-version && git push --follow-tags",
|
||||
"test": "jest --coverage --verbose",
|
||||
"commit": "cz"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -33,13 +32,7 @@
|
||||
"eslint": "^8.8.0",
|
||||
"@typescript-eslint/parser": "^5.10.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||
"@babel/core": "^7.17.2",
|
||||
"@babel/preset-env": "^7.16.11",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@types/jest": "^27.4.0",
|
||||
"babel-jest": "^27.5.1",
|
||||
"cz-conventional-changelog": "3.0.1",
|
||||
"jest": "^27.5.1",
|
||||
"prettier": "2.6.2",
|
||||
"standard-version": "^9.3.2",
|
||||
"typedoc": "^0.22.11",
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface BaseModule {
|
||||
type: CommandType | PluginType;
|
||||
name?: string;
|
||||
description: string;
|
||||
execute: (ctx: Context, args: Args) => Awaitable<void>;
|
||||
execute: (ctx: Context, args: Args) => Awaitable<void | unknown>;
|
||||
}
|
||||
|
||||
//possible refactoring types into interfaces and not types
|
||||
@@ -67,7 +67,7 @@ export type ContextMenuUser = Override<
|
||||
type: CommandType.MenuUser;
|
||||
onEvent: EventPlugin<CommandType.MenuUser>[];
|
||||
plugins: CommandPlugin[];
|
||||
execute: (ctx: UserContextMenuCommandInteraction) => Awaitable<void>;
|
||||
execute: (ctx: UserContextMenuCommandInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -77,7 +77,7 @@ export type ContextMenuMsg = Override<
|
||||
type: CommandType.MenuMsg;
|
||||
onEvent: EventPlugin<CommandType.MenuMsg>[];
|
||||
plugins: CommandPlugin[];
|
||||
execute: (ctx: MessageContextMenuCommandInteraction) => Awaitable<void>;
|
||||
execute: (ctx: MessageContextMenuCommandInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -87,7 +87,7 @@ export type ButtonCommand = Override<
|
||||
type: CommandType.Button;
|
||||
onEvent: EventPlugin<CommandType.Button>[];
|
||||
plugins: CommandPlugin[];
|
||||
execute: (ctx: ButtonInteraction) => Awaitable<void>;
|
||||
execute: (ctx: ButtonInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -97,7 +97,7 @@ export type SelectMenuCommand = Override<
|
||||
type: CommandType.MenuSelect;
|
||||
onEvent: EventPlugin<CommandType.MenuSelect>[];
|
||||
plugins: CommandPlugin[];
|
||||
execute: (ctx: SelectMenuInteraction) => Awaitable<void>;
|
||||
execute: (ctx: SelectMenuInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -107,7 +107,7 @@ export type ModalSubmitCommand = Override<
|
||||
type: CommandType.Modal;
|
||||
onEvent: EventPlugin<CommandType.Modal>[];
|
||||
plugins: CommandPlugin[];
|
||||
execute: (ctx: ModalSubmitInteraction) => Awaitable<void>;
|
||||
execute: (ctx: ModalSubmitInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -121,7 +121,7 @@ export type AutocompleteCommand = Override<
|
||||
type: CommandType.Autocomplete;
|
||||
name: string;
|
||||
onEvent: EventPlugin<CommandType.Autocomplete>[];
|
||||
execute: (ctx: AutocompleteInteraction) => Awaitable<void>;
|
||||
execute: (ctx: AutocompleteInteraction) => Awaitable<void | unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user