aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-04 12:39:08 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-04 12:39:08 -0400
commitbb774bbe0cfedd77be852f73448df061252b7c0a (patch)
tree579c2f11717dd5aa3a0d6ea990479368b338cd66 /src/lib/extensions
parent939f19c1a8a7efea00fc3df3504a41fc58a3b286 (diff)
downloadtanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.tar.gz
tanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.tar.bz2
tanzanite-bb774bbe0cfedd77be852f73448df061252b7c0a.zip
I sure do love when one line causes 400 errors
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts4
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandHandler.ts14
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandUtil.ts9
-rw-r--r--src/lib/extensions/discord-akairo/BushListener.ts7
-rw-r--r--src/lib/extensions/discord-akairo/BushSlashMessage.ts2
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);
}