From 369a151f53a8b6ab2fd79c226b132fbd82f8e88d Mon Sep 17 00:00:00 2001 From: JandereDev Date: Mon, 30 May 2022 10:11:38 +0200 Subject: [PATCH] fix permission check --- bridge/src/discord/commands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/src/discord/commands.ts b/bridge/src/discord/commands.ts index 00ba524..bb4d159 100644 --- a/bridge/src/discord/commands.ts +++ b/bridge/src/discord/commands.ts @@ -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!)!;