Answers for "unmute discord.js"

0

unmute discord.js

client.on('message', message => {
    if(message.content.startsWith(prefix + 'unmute')){
         if(message.member.hasPermission('MANAGE_ROLES')) {
             const role = message.guild.roles.cache.find(role => role.name === 'Muted');
                 const member = message.mentions.members.first();
                     member.roles.remove(role); 
                     message.channel.send(member + ' Has Been UnMuted');

            } else {
                 message.channel.send("Please Mention Who To Mute")
             }     
        }
});
Posted by: Guest on June-19-2021

Browse Popular Code Answers by Language