aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-08 19:37:57 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-08 19:37:57 -0500
commitb86a05f4b21c62e18bf669e00646b715a409bdb0 (patch)
tree6d3623c45fd321ade5f8bbf6de37385f43123759 /src/lib/extensions/discord-akairo
parent57e47b8b84dee001c65c1ab43833c09fef056a4b (diff)
downloadtanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.tar.gz
tanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.tar.bz2
tanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.zip
feat: misc changes for extentions
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 1a748ed..5a911f7 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -73,6 +73,7 @@ import { BushGuildEmoji } from '../discord.js/BushGuildEmoji.js';
import { BushGuildMember } from '../discord.js/BushGuildMember.js';
import { BushMessage } from '../discord.js/BushMessage.js';
import { BushMessageReaction } from '../discord.js/BushMessageReaction.js';
+import { BushModalSubmitInteraction } from '../discord.js/BushModalSubmitInteraction.js';
import { BushNewsChannel } from '../discord.js/BushNewsChannel.js';
import { BushPresence } from '../discord.js/BushPresence.js';
import { BushRole } from '../discord.js/BushRole.js';
@@ -330,6 +331,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
Structures.extend('ChatInputCommandInteraction', () => BushChatInputCommandInteraction);
Structures.extend('ButtonInteraction', () => BushButtonInteraction);
Structures.extend('SelectMenuInteraction', () => BushSelectMenuInteraction);
+ Structures.extend('ModalSubmitInteraction', () => BushModalSubmitInteraction);
}
/**
@@ -349,7 +351,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
this.commandHandler.useContextMenuCommandHandler(this.contextMenuCommandHandler);
this.commandHandler.ignorePermissions = this.config.owners;
this.commandHandler.ignoreCooldown = [...new Set([...this.config.owners, ...this.cache.shared.superUsers])];
- this.listenerHandler.setEmitters({
+ const emitters: Emitters = {
client: this,
commandHandler: this.commandHandler,
inhibitorHandler: this.inhibitorHandler,
@@ -361,7 +363,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
gateway: this.ws,
rest: this.rest,
ws: this.ws
- });
+ };
+ this.listenerHandler.setEmitters(emitters);
this.commandHandler.resolver.addTypes({
duration,
contentWithDuration,
@@ -495,7 +498,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
}
}
-export interface BushClient extends EventEmitter, PatchedElements {
+export interface BushClient<Ready extends boolean = boolean> extends EventEmitter, PatchedElements, AkairoClient<Ready> {
get emojis(): BushBaseGuildEmojiManager;
on<K extends keyof BushClientEvents>(event: K, listener: (...args: BushClientEvents[K]) => Awaitable<void>): this;
@@ -525,3 +528,17 @@ export interface BushStats {
*/
commandsUsed: bigint;
}
+
+export interface Emitters {
+ client: BushClient;
+ commandHandler: BushClient['commandHandler'];
+ inhibitorHandler: BushClient['inhibitorHandler'];
+ listenerHandler: BushClient['listenerHandler'];
+ taskHandler: BushClient['taskHandler'];
+ contextMenuCommandHandler: BushClient['contextMenuCommandHandler'];
+ process: NodeJS.Process;
+ stdin: readline.Interface;
+ gateway: BushClient['ws'];
+ rest: BushClient['rest'];
+ ws: BushClient['ws'];
+}