aboutsummaryrefslogtreecommitdiff
path: root/src/listeners
diff options
context:
space:
mode:
Diffstat (limited to 'src/listeners')
-rw-r--r--src/listeners/client/akairoDebug.ts6
-rw-r--r--src/listeners/client/interactionCreate.ts5
-rw-r--r--src/listeners/guild-custom/bushLockdown.ts9
-rw-r--r--src/listeners/guild-custom/bushUnlockdown.ts9
4 files changed, 21 insertions, 8 deletions
diff --git a/src/listeners/client/akairoDebug.ts b/src/listeners/client/akairoDebug.ts
index c8a28c4..0cb57a5 100644
--- a/src/listeners/client/akairoDebug.ts
+++ b/src/listeners/client/akairoDebug.ts
@@ -9,7 +9,9 @@ export default class DiscordJsDebugListener extends BushListener {
});
}
- public override async exec(...[message, ..._other]: BushClientEvents['debug']): Promise<void> {
- void client.console.superVerboseRaw('akairoDebug', message);
+ public override async exec(...[message, ...other]: BushClientEvents['debug']): Promise<void> {
+ if (other.length && !message.includes('[registerInteractionCommands]'))
+ void client.console.superVerboseRaw('akairoDebug', message, ...other);
+ else void client.console.superVerbose('akairoDebug', message);
}
}
diff --git a/src/listeners/client/interactionCreate.ts b/src/listeners/client/interactionCreate.ts
index 26aa0a9..7eb2f10 100644
--- a/src/listeners/client/interactionCreate.ts
+++ b/src/listeners/client/interactionCreate.ts
@@ -20,8 +20,9 @@ export default class InteractionCreateListener extends BushListener {
if (interaction.isCommand()) {
return;
} else if (interaction.isButton()) {
- if (interaction.customId.startsWith('paginate_') || interaction.customId.startsWith('command_')) return;
- else if (interaction.customId.startsWith('automod;')) void AutoMod.handleInteraction(interaction as BushButtonInteraction);
+ const id = interaction.customId;
+ if (id.startsWith('paginate_') || id.startsWith('command_') || id.startsWith('confirmationPrompt_')) return;
+ else if (id.startsWith('automod;')) void AutoMod.handleInteraction(interaction as BushButtonInteraction);
else return await interaction.reply({ content: 'Buttons go brrr', ephemeral: true });
} else if (interaction.isSelectMenu()) {
if (interaction.customId.startsWith('command_')) return;
diff --git a/src/listeners/guild-custom/bushLockdown.ts b/src/listeners/guild-custom/bushLockdown.ts
index be55a07..d48ddf1 100644
--- a/src/listeners/guild-custom/bushLockdown.ts
+++ b/src/listeners/guild-custom/bushLockdown.ts
@@ -10,7 +10,7 @@ export default class BushLockdownListener extends BushListener {
});
}
- public override async exec(...[moderator, reason, channel, _all]: BushClientEvents['bushLockdown']) {
+ public override async exec(...[moderator, reason, channelsSuccessMap, _all]: BushClientEvents['bushLockdown']) {
const logChannel = await moderator.guild.getLogChannel('moderation');
if (!logChannel) return;
@@ -21,7 +21,12 @@ export default class BushLockdownListener extends BushListener {
.addField('**Moderator**', `${moderator} (${moderator.user.tag})`)
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
.addField('**Reason**', `${reason || '[No Reason Provided]'}`)
- .addField('**Channel**', `${channel?.id ? `<#${channel.id}>` : '[All Configured Channels]'}`);
+ .addField(
+ `**Channel${channelsSuccessMap.size > 1 ? 's' : ''}**`,
+ channelsSuccessMap
+ .map((success, channel) => `<#${channel}> ${success ? util.emojis.success : util.emojis.error}`)
+ .join('\n')
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/guild-custom/bushUnlockdown.ts b/src/listeners/guild-custom/bushUnlockdown.ts
index d5831c6..cfddc2f 100644
--- a/src/listeners/guild-custom/bushUnlockdown.ts
+++ b/src/listeners/guild-custom/bushUnlockdown.ts
@@ -10,7 +10,7 @@ export default class BushUnlockdownListener extends BushListener {
});
}
- public override async exec(...[moderator, reason, channel, _all]: BushClientEvents['bushUnlockdown']) {
+ public override async exec(...[moderator, reason, channelsSuccessMap, _all]: BushClientEvents['bushUnlockdown']) {
const logChannel = await moderator.guild.getLogChannel('moderation');
if (!logChannel) return;
@@ -21,7 +21,12 @@ export default class BushUnlockdownListener extends BushListener {
.addField('**Moderator**', `${moderator} (${moderator.user.tag})`)
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
.addField('**Reason**', `${reason || '[No Reason Provided]'}`)
- .addField('**Channel**', `${channel?.id ? `<#${channel.id}>` : '[All Configured Channels]'}`);
+ .addField(
+ `**Channel${channelsSuccessMap.size > 1 ? 's' : ''}**`,
+ channelsSuccessMap
+ .map((success, channel) => `<#${channel}> ${success ? util.emojis.success : util.emojis.error}`)
+ .join('\n')
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}