diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/config/config.ts | 6 | ||||
-rw-r--r-- | src/commands/config/features.ts | 6 | ||||
-rw-r--r-- | src/commands/info/help.ts | 1 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 4 | ||||
-rw-r--r-- | src/lib/extensions/discord.js/BushClientEvents.d.ts | 5 |
5 files changed, 10 insertions, 12 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 6e7373c..3f1fc8c 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -240,10 +240,8 @@ export default class SettingsCommand extends BushCommand { } } const collector = msg.createMessageComponentCollector({ - channel: message.channel ?? undefined, - guild: message.guild, - message: message as Message, - time: 300_000 + time: 300_000, + filter: (i) => i.guildId === message.guildId && i.message.id === message.id }); collector.on('collect', async (interaction: MessageComponentInteraction) => { diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 8010ab9..743b243 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -28,11 +28,9 @@ export default class FeaturesCommand extends BushCommand { const components = this.generateComponents(guildFeaturesArr, false); const msg = (await message.util.reply({ embeds: [featureEmbed], components: [components] })) as Message; const collector = msg.createMessageComponentCollector({ - channel: message.channel ?? undefined, - guild: message.guild, componentType: 'SELECT_MENU', - message: message as Message, - time: 300_000 + time: 300_000, + filter: (i) => i.guildId === message.guildId && i.message.id === message.id }); collector.on('collect', async (interaction: SelectMenuInteraction) => { diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index 4674ea2..8c97ba8 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,7 +1,6 @@ import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; import packageDotJSON from '../../../package.json'; - export default class HelpCommand extends BushCommand { public constructor() { super('help', { diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 4c877f3..48ba90d 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -336,9 +336,9 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re inhibitors: this.inhibitorHandler, tasks: this.taskHandler }; - for (const loader of Object.keys(loaders)) { + for (const loader in loaders) { try { - loaders[loader as keyof typeof loaders].loadAll(); + await loaders[loader as keyof typeof loaders].loadAll(); void this.logger.success('startup', `Successfully loaded <<${loader}>>.`, false); } catch (e) { void this.logger.error('startup', `Unable to load loader <<${loader}>> with error:\n${e?.stack || e}`, false); diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts index 96dc4c5..eb36153 100644 --- a/src/lib/extensions/discord.js/BushClientEvents.d.ts +++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts @@ -85,7 +85,10 @@ export interface BushClientEvents extends ClientEvents { inviteDelete: [invite: Invite]; messageCreate: [message: BushMessage]; messageDelete: [message: BushMessage | PartialBushMessage]; - messageReactionRemoveAll: [message: BushMessage | PartialBushMessage]; + messageReactionRemoveAll: [ + message: BushMessage | PartialBushMessage, + reactions: Collection<string, BushMessageReaction> + ]; messageReactionRemoveEmoji: [ reaction: BushMessageReaction | PartialBushMessageReaction ]; |