diff options
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushCommandUtil.ts | 7 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushSlashMessage.ts | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/extensions/discord-akairo/BushCommandUtil.ts b/src/lib/extensions/discord-akairo/BushCommandUtil.ts index bda0e74..7720d57 100644 --- a/src/lib/extensions/discord-akairo/BushCommandUtil.ts +++ b/src/lib/extensions/discord-akairo/BushCommandUtil.ts @@ -4,18 +4,19 @@ import { Collection } from 'discord.js'; import { BushMessage } from '../discord.js/BushMessage'; import { BushCommand } from './BushCommand'; import { BushCommandHandler } from './BushCommandHandler'; +import { BushSlashMessage } from './BushSlashMessage'; export interface BushParsedComponentData extends ParsedComponentData { command?: BushCommand; } -export class BushCommandUtil extends CommandUtil { +export class BushCommandUtil<BushMessageType extends BushMessage | BushSlashMessage> extends CommandUtil<BushMessageType> { public declare parsed: BushParsedComponentData | null; public declare handler: BushCommandHandler; - public declare message: BushMessage; + public declare message: BushMessageType; public declare messages: Collection<Snowflake, BushMessage> | null; - public constructor(handler: BushCommandHandler, message: BushMessage) { + public constructor(handler: BushCommandHandler, message: BushMessageType) { super(handler, message); } } diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts index d75d0a7..b5e48ea 100644 --- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts +++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts @@ -8,7 +8,7 @@ import { BushCommandUtil } from './BushCommandUtil'; export class BushSlashMessage extends AkairoMessage { public declare client: BushClient; - public declare util: BushCommandUtil; + public declare util: BushCommandUtil<BushSlashMessage>; public declare author: BushUser; public declare member: BushGuildMember | null; public constructor(client: BushClient, interaction: CommandInteraction) { |