harmony/src/interactions/slashModule.ts

19 lines
426 B
TypeScript
Raw Normal View History

import { SlashCommandHandler } from './slashClient.ts'
export class SlashModule {
name: string = ''
commands: SlashCommandHandler[] = []
_decoratedSlash?: SlashCommandHandler[]
constructor() {
if (this._decoratedSlash !== undefined) {
this.commands = this._decoratedSlash
}
}
add(handler: SlashCommandHandler): SlashModule {
this.commands.push(handler)
return this
}
}