I wanted to give my bot the functionality to assign roles with a command
For example, +mod @user
would give @user
the role of Mod.
Code in my main.js
:
if(command == 'mod'){
client.commands.get('mod').execute(message, args);
}
Code in my mod.js
file:
module.exports = {
name: 'mod',
description: "This command gives member the Mod role",
execute(message, args){
const member = message.mentions.users.first();
member.roles.add('role ID xxxx');
}
}
I get an error saying the member is empty. Am I doing something wrong?
I don’t think it said
member
is empty.users
don’t have roles though,members
have. So you will need to get the first mentionedmember
instead.tadalafil dosage – tadalafil price online tadalafil
Jffpao – http://virviaga.com/ buy viagra montana
Gcxebf – https://www.ecosia.org/search?q=erectilepls.com Ecento hwsrfr
Aptkuv – where can i buy viagra over the counter in singapore Qeeuey agbviw
Wtorzk – college essays for dummies Hnzquw zjujjy
Ibpaly – generic name for propecia Ecgwby yaxfxj
Emzrqm – propecia brand vs generic Asoolh gazmex
Qxtmpi – term paper buy Nmbbfk nhbjho
Soscla – history essay writing Voljcr ciwswg
Urdbbt – lasix 100 mg Jvsigr nobdcr