fix slash module decorators

This commit is contained in:
DjDeveloper 2021-04-24 14:32:40 +05:30 committed by GitHub
parent 962d90aca8
commit 66031d56c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -3,11 +3,10 @@ import type { SlashCommandHandler } from './slashClient.ts'
export class SlashModule { export class SlashModule {
name: string = '' name: string = ''
commands: SlashCommandHandler[] = [] commands: SlashCommandHandler[] = []
_decoratedSlash?: SlashCommandHandler[]
constructor() { constructor() {
if (this._decoratedSlash !== undefined) { if ((this as any)._decoratedSlash !== undefined) {
this.commands = this._decoratedSlash ;(this as any).commands = (this as any)._decoratedSlash
} }
} }