From 554303c3d9b4c68b2a026a30650e8d085f598780 Mon Sep 17 00:00:00 2001 From: *x1 Date: Tue, 28 May 2024 23:00:30 +0200 Subject: [PATCH] Update ajout gif --- commands/gestion/mute.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/gestion/mute.js b/commands/gestion/mute.js index 7581dfc..51c3173 100644 --- a/commands/gestion/mute.js +++ b/commands/gestion/mute.js @@ -9,7 +9,8 @@ module.exports = { permission: 0, async execute(message, args, client) { - if (!interaction.guild.channels.cache.permissionsFor(interaction.user).has(PermissionFlagsBits.KickMembers) && !client.config.owners.includes(interaction.user.id)) { + const authorPerms = message.channel.permissionsFor(message.author) + if ((!authorPerms || !authorPerms.has(PermissionFlagsBits.MuteMembers)) && !client.config.owners.includes(message.author.id)) { return message.reply({ embeds: [ new EmbedBuilder()