fix permission check
This commit is contained in:
parent
ad353463a6
commit
369a151f53
1 changed files with 2 additions and 2 deletions
|
@ -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