From 22df9a219da6354ef25463858057613522993c21 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Wed, 3 May 2023 10:12:59 +1000 Subject: [PATCH] Add reason to audit logs for button role system. --- src/events/interactionCreate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index b95334a..2849276 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -20,10 +20,10 @@ export default { if (interaction.customId.startsWith('reaction-') && client.config.botSwitches.buttonRoles){ const RoleID = interaction.customId.replace('reaction-',''); if (interaction.member.roles.cache.has(RoleID)){ - interaction.member.roles.remove(RoleID); + interaction.member.roles.remove(RoleID, 'Button Role'); interaction.reply({content: `You have been removed from <@&${RoleID}>`, ephemeral: true}) } else { - interaction.member.roles.add(RoleID); + interaction.member.roles.add(RoleID, 'Button Role'); interaction.reply({content: `You have been added to <@&${RoleID}>`, ephemeral: true}) } } else console.log(client.logTime(), `Button pressed at ${interaction.message.url}`);