fix permission check

This commit is contained in:
JandereDev 2022-05-30 10:11:38 +02:00
parent ad353463a6
commit 369a151f53
No known key found for this signature in database
GPG key ID: 5D5E18ACB990F57A

View file

@ -99,9 +99,9 @@ client.on('interactionCreate', async interaction => {
switch(interaction.commandName) { switch(interaction.commandName) {
case 'bridge': case 'bridge':
if (!interaction.memberPermissions?.has('MANAGE_GUILD') && 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!)!; const ownPerms = (interaction.channel as TextChannel).permissionsFor(client.user!)!;