mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 10:45:27 +00:00
fix permission check
This commit is contained in:
parent
ad353463a6
commit
369a151f53
|
@ -99,9 +99,9 @@ client.on('interactionCreate', async interaction => {
|
|||
switch(interaction.commandName) {
|
||||
case 'bridge':
|
||||
if (!interaction.memberPermissions?.has('MANAGE_GUILD') &&
|
||||
interaction.options.getSubcommand(true) != 'help'
|
||||
['confirm', 'unlink'].includes(interaction.options.getSubcommand(true))
|
||||
) {
|
||||
return await interaction.reply(`\`MANAGE_GUILD\` permission is required for this.`);
|
||||
return await interaction.reply({ content: `\`MANAGE_GUILD\` permission is required for this.`, ephemeral: true });
|
||||
}
|
||||
|
||||
const ownPerms = (interaction.channel as TextChannel).permissionsFor(client.user!)!;
|
||||
|
|
Loading…
Reference in a new issue