mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 06:04:16 +02:00
feat(arabot): add soft mute command
This commit is contained in:
parent
8d1276ab2c
commit
fa0d9c2a60
@ -78,12 +78,20 @@ export class SoftMuteCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
if (guildMember.roles.cache.has(IDs.roles.restrictions.softMute)) {
|
||||
await guildMember.roles.remove(IDs.roles.restrictions.softMute);
|
||||
await interaction.reply({
|
||||
content: `Removed soft muted for ${user}`,
|
||||
fetchReply: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await guildMember.roles.add(IDs.roles.restrictions.softMute);
|
||||
|
||||
await interaction.reply({
|
||||
content: `Soft muted ${user}`,
|
||||
fetchReply: true,
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
|
||||
@ -98,7 +106,13 @@ export class SoftMuteCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
await user.roles.add(IDs.roles.restrictions.softMute);
|
||||
if (user.roles.cache.has(IDs.roles.restrictions.softMute)) {
|
||||
await user.roles.remove(IDs.roles.restrictions.softMute);
|
||||
await message.reply(`Removed soft mute for ${user}`);
|
||||
} else {
|
||||
await user.roles.add(IDs.roles.restrictions.softMute);
|
||||
await message.reply(`Soft muted ${user}`);
|
||||
}
|
||||
|
||||
await message.react('✅');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user