Sunday, 4 June 2017

Trying to filter more than one role with discord.js

Hello im trying to filter more than one role in discord.js i dont know how it works and i really need it for my bot. please help this is my code.

var rolevalu = ["mods", "owner", "donators"];

function Roles(rolevalue){ return rolevalue = rolevalu; }

if(cmd('setst', message)){ let modRole = message.guild.roles.filterArray(Roles);

   if(message.member.roles.has(modRole.id)){

//do something
}
}

by the way i cant set the tag to discord.js because i dont have 1500 points so sorry about that



via Hristijan Mizimakovski

No comments:

Post a Comment