Click here to Skip to main content
14,920,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript


module.exports = {
    name: 'youtube',
    description: "Youtube channel.",
    execute(message, args){


        let role = message.member.roles.cache.some(r => r.name === "Mod");


        if(message.member.roles.cache.some(r => r.name === "Mod"))
            message.channel.send('https://www.yoh-qPg')


        } else {
            message.channel.send('You need the bot role ill add it to you.'),
            message.member.roles.add('role').catch(console.error),
        }
        
    }
}


What I have tried:

I tried to replace the thing and deleted then replaced.
Posted
Updated 9-May-21 3:14am

1 solution

JavaScript
message.channel.send('You need the bot role ill add it to you.'),
message.member.roles.add('role').catch(console.error),

You have commas at the end of these statements, whereas they require semi-colons (;).
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900