From 6f5eb8c9b0b9aa1cfa7e90440e688cb8decee8c8 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 25 Apr 2022 22:24:56 -0400 Subject: fix: I am an idiot --- src/listeners/interaction/interactionCreate.ts | 28 ++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/listeners/interaction') diff --git a/src/listeners/interaction/interactionCreate.ts b/src/listeners/interaction/interactionCreate.ts index e7a2944..7fdbbbf 100644 --- a/src/listeners/interaction/interactionCreate.ts +++ b/src/listeners/interaction/interactionCreate.ts @@ -30,12 +30,32 @@ export default class InteractionCreateListener extends BushListener { const has = interaction.member.roles.cache.has(roleId); if (has) { const success = await interaction.member.roles.remove(roleId).catch(() => false); - if (success) return interaction.reply({ content: `${util.emojis.success} Removed ${role.name} from you.` }); - else return interaction.reply({ content: `${util.emojis.error} Failed to remove ${role.name} from you.` }); + if (success) + return interaction.reply({ + content: `${util.emojis.success} Removed the ${role} role from you.`, + ephemeral: true, + allowedMentions: {} + }); + else + return interaction.reply({ + content: `${util.emojis.error} Failed to remove ${role} from you.`, + ephemeral: true, + allowedMentions: {} + }); } else { const success = await interaction.member.roles.add(roleId).catch(() => false); - if (success) return interaction.reply({ content: `${util.emojis.success} Added ${role.name} to you.` }); - else return interaction.reply({ content: `${util.emojis.error} Failed to add ${role.name} to you.` }); + if (success) + return interaction.reply({ + content: `${util.emojis.success} Added the ${role} role to you.`, + ephemeral: true, + allowedMentions: {} + }); + else + return interaction.reply({ + content: `${util.emojis.error} Failed to add ${role} to you.`, + ephemeral: true, + allowedMentions: {} + }); } } else return await interaction.reply({ content: 'Buttons go brrr', ephemeral: true }); } else if (interaction.isSelectMenu()) { -- cgit