Add per-guild moderation settings and records
This commit is contained in:
@@ -14,22 +14,20 @@ module.exports = {
|
||||
}
|
||||
|
||||
try {
|
||||
if (command.permissionGroup) {
|
||||
const allowed = await isCommandAllowed({
|
||||
guildId: interaction.guildId,
|
||||
userId: interaction.user.id,
|
||||
member: interaction.member,
|
||||
commandName: interaction.commandName,
|
||||
permissionGroup: command.permissionGroup,
|
||||
});
|
||||
const allowed = await isCommandAllowed({
|
||||
guildId: interaction.guildId,
|
||||
userId: interaction.user.id,
|
||||
member: interaction.member,
|
||||
commandName: interaction.commandName,
|
||||
permissionGroup: command.permissionGroup,
|
||||
});
|
||||
|
||||
if (!allowed) {
|
||||
await interaction.reply({
|
||||
content: 'You do not have permission to use this command.',
|
||||
flags: MessageFlags.Ephemeral,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!allowed) {
|
||||
await interaction.reply({
|
||||
content: 'You do not have permission to use this command.',
|
||||
flags: MessageFlags.Ephemeral,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await command.execute(interaction);
|
||||
|
||||
Reference in New Issue
Block a user