mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Add reason to audit logs for button role system.
This commit is contained in:
parent
0d32686ffd
commit
11f7792bef
@ -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