mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-29 05:35:38 -05:00
Add reason to audit logs for button role system.
This commit is contained in:
parent
3bdc70a3a1
commit
62a375b52f
@ -20,10 +20,10 @@ export default {
|
|||||||
if (interaction.customId.startsWith('reaction-') && client.config.botSwitches.buttonRoles){
|
if (interaction.customId.startsWith('reaction-') && client.config.botSwitches.buttonRoles){
|
||||||
const RoleID = interaction.customId.replace('reaction-','');
|
const RoleID = interaction.customId.replace('reaction-','');
|
||||||
if (interaction.member.roles.cache.has(RoleID)){
|
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})
|
interaction.reply({content: `You have been removed from <@&${RoleID}>`, ephemeral: true})
|
||||||
} else {
|
} else {
|
||||||
interaction.member.roles.add(RoleID);
|
interaction.member.roles.add(RoleID, 'Button Role');
|
||||||
interaction.reply({content: `You have been added to <@&${RoleID}>`, ephemeral: true})
|
interaction.reply({content: `You have been added to <@&${RoleID}>`, ephemeral: true})
|
||||||
}
|
}
|
||||||
} else console.log(client.logTime(), `Button pressed at ${interaction.message.url}`);
|
} else console.log(client.logTime(), `Button pressed at ${interaction.message.url}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user