diff options
Diffstat (limited to 'src/lib')
5 files changed, 14 insertions, 22 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index ab66f60..4cc8712 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -338,7 +338,9 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re } } - /** Logs out, terminates the connection to Discord, and destroys the client. */ + /** + * Logs out, terminates the connection to Discord, and destroys the client. + */ public override destroy(relogin = false): void | Promise<string> { super.destroy(); if (relogin) { diff --git a/src/lib/extensions/discord-akairo/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts index 44a0966..c533832 100644 --- a/src/lib/extensions/discord-akairo/BushCommandHandler.ts +++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts @@ -32,18 +32,4 @@ export class BushCommandHandler extends CommandHandler { public constructor(client: BushClient, options: CommandHandlerOptions) { super(client, options); } - - public override async runPostTypeInhibitors(message: BushMessage, command: BushCommand, slash = false): Promise<boolean> { - const reason = this.inhibitorHandler ? await this.inhibitorHandler.test('post', message, command) : null; - if (reason != null) { - this.emit(slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, message, command, reason); - return true; - } - - if (await this.runPermissionChecks(message, command)) { - return true; - } - - return !!this.runCooldowns(message, command); - } } diff --git a/src/lib/extensions/discord-akairo/BushCommandUtil.ts b/src/lib/extensions/discord-akairo/BushCommandUtil.ts index 1e86401..bda0e74 100644 --- a/src/lib/extensions/discord-akairo/BushCommandUtil.ts +++ b/src/lib/extensions/discord-akairo/BushCommandUtil.ts @@ -1,5 +1,6 @@ import { CommandUtil, ParsedComponentData } from 'discord-akairo'; -import { Collection, Snowflake } from 'discord.js'; +import { Snowflake } from 'discord-api-types'; +import { Collection } from 'discord.js'; import { BushMessage } from '../discord.js/BushMessage'; import { BushCommand } from './BushCommand'; import { BushCommandHandler } from './BushCommandHandler'; @@ -9,14 +10,12 @@ export interface BushParsedComponentData extends ParsedComponentData { } export class BushCommandUtil extends CommandUtil { - public declare parsed?: BushParsedComponentData; + public declare parsed: BushParsedComponentData | null; public declare handler: BushCommandHandler; public declare message: BushMessage; - public declare messages?: Collection<Snowflake, BushMessage>; - // public test: string; + public declare messages: Collection<Snowflake, BushMessage> | null; public constructor(handler: BushCommandHandler, message: BushMessage) { super(handler, message); - // this.test = 'abc'; } } diff --git a/src/lib/extensions/discord-akairo/BushListener.ts b/src/lib/extensions/discord-akairo/BushListener.ts index b98bb02..82e874f 100644 --- a/src/lib/extensions/discord-akairo/BushListener.ts +++ b/src/lib/extensions/discord-akairo/BushListener.ts @@ -5,7 +5,12 @@ export class BushListener extends Listener { public declare client: BushClient; public constructor( id: string, - options: { emitter: string | EventEmitter; event: string; type?: 'on' | 'once'; category?: string } + options: { + emitter: string | EventEmitter; + event: string; + type?: 'on' | 'once' | 'prependListener' | 'prependOnceListener'; + category?: string; + } ) { super(id, options); } diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts index d10a024..442b0d4 100644 --- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts +++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts @@ -11,7 +11,7 @@ export class BushSlashMessage extends AkairoMessage { public declare client: BushClient; public declare util: BushCommandUtil; public declare author: BushUser; - public declare member: BushGuildMember; + public declare member: BushGuildMember | null; public constructor(client: BushClient, interaction: CommandInteraction, command: BushCommand) { super(client, interaction, command); } |