Add role to user

My verify command is not working heres the code

if (command === “verify” || command === “ver”) {
if ( === “760281312317014046”) {
const mainrole = message.member.roles.some(
role => === “Member”
const member = message.member;



You’re using message.member.roles.some which is invalid with discord.js v12 - you need to update to message.member.roles.cache.some.

Also, if you want to add a role you must use a RoleResolvable, in your code you’re trying to add something that will either be true or false - not a RoleResolvable.

You should instead be using message.member.roles.cache.find(role => === "Member") which will return a RoleResolvable.


Ill try thx