I made a simple quote bot for a server, but the admin only wants mod+ people to be able to add quotes to avoid spam. I went to the documentation and did everything, but I ca
I'm probably wayy to late with this, but I just had the same problem, and the way i solved it is to search for the role, and then check if the variable has anything on it. Say i wanna check for if the author of the message has admin role:
client.on('message',message =>{
adminrole = message.member.roles.cache.find(role => role.name == "Admin");
if(adminrole != null){memberIsAdmin = true;}else{memberIsAdmin = false;}
}
Maybe this will help someone, note that I'm not very experienced with js tho :) Have a nice day y'all