I've got a verification bot for my server with linked roles. I've currently got it to remove all roles manually one by one, but of course this is inefficient and it only works for about 5/6 roles before stopping for a few seconds and continuing. What I'd like to try is some sort of discUser.removeRoles kind of thing, if that's possible.
Or is there a way to only try removing a role if the person has it? My code just does discuser.removeRole for every binded rank.
UPDATE
I got a notification about this question, so wanted to update it with a new solution for anyone else who finds this:
- Create a table of your role ids. (e.g
var giveThese = []
) guildMember.roles.add(giveThese,"Reason / Description"
For removing, you can replace roles.add with roles.remove