feat(bots/discord): update to newer command definition framework

This commit is contained in:
PalmDevs
2024-08-13 21:15:34 +07:00
parent 82fac783ea
commit 97f2795df4
15 changed files with 340 additions and 162 deletions

View File

@@ -17,7 +17,7 @@ export const logger = createLogger({
import * as commands from './commands'
import * as schemas from './database/schemas'
import type { default as Command, CommandOptionsOptions } from './classes/Command'
import type { default as Command, CommandOptionsOptions, CommandType } from './classes/Command'
export const api = {
client: new APIClient({
@@ -83,7 +83,7 @@ export const discord = {
}),
commands: Object.fromEntries(Object.values(commands).map(cmd => [cmd.name, cmd])) as Record<
string,
Command<boolean, CommandOptionsOptions | undefined, boolean>
Command<CommandType, CommandOptionsOptions | undefined, boolean>
>,
stickyMessages: {} as Record<
string,