diff --git a/src/commands/moderation/bulkunban.ts b/src/commands/moderation/bulkunban.ts index 650600c..c642eed 100644 --- a/src/commands/moderation/bulkunban.ts +++ b/src/commands/moderation/bulkunban.ts @@ -35,16 +35,22 @@ const BulkUnban: Command = { const unbans = bans.filter((ban) => ban.reason && ban.reason.toLowerCase().includes(reasonOption.toLowerCase())); logger.info(`Matching bans found: ${unbans.size}`); // <-- Log matched bans + await interaction.reply(`Starting to unban ${unbans.size} users. This might take a while...`); + for (const ban of unbans.values()) { logger.info(`Attempting to unban: ${ban.user.tag} - Reason: ${ban.reason}`); // <-- Log each user being unbanned await interaction.guild.bans.remove(ban.user, `Used /bulkunban for reason: ${reasonOption}`); amount++; } - await interaction.reply(`Successfully unbanned ${amount} users.`); + await interaction.followUp(`Successfully unbanned ${amount} users.`); } catch (e) { - await interaction.reply('An error occurred while processing the unbans.'); logger.error(e); + if (interaction.replied || interaction.deferred) { + await interaction.followUp('An error occurred while processing the unbans.'); + } else { + await interaction.reply('An error occurred while processing the unbans.'); + } } }, }; diff --git a/src/events/onMemberJoin.ts b/src/events/onMemberJoin.ts index 6bb2f7a..6623108 100644 --- a/src/events/onMemberJoin.ts +++ b/src/events/onMemberJoin.ts @@ -6,7 +6,7 @@ export const onMemberJoin = async (member: GuildMember) => { const channel = member.guild.channels.cache.get(member_activity_channel) as TextChannel; if (!channel) return; - const welcomeMessage = `Welcome <@${member.id}> to the server!`; + const welcomeMessage = `Welcome ${member.id} to the server!`; channel.send(welcomeMessage); const roleId = '842455998266605610'; // Overextended Member RoleID