Hello,
I searched on Google how to add a role by its name. Can you help me?
I tried this:
event.getGuild().getController().addRolesToMember(event.getMember(), event.getJDA().getRolesByName("MYGROUP", true)).complete();
But it return me an error. (https://pastebin.com/VmcAix3m)
It's hard for me to understand how to add a role to a member.
P.S.: Sorry for my English
Can't modify a role with higher or equal highest role than yourself!
Role hierarchy my friend. The highest role on the bot is below the one it is trying to assign.
Okay thanks, sorry for this issue. xD
@liovy is this resolved then? Gonna close the issue because it looks that way.
For future help like this (basic questions), it would be better if you would ask in our guild instead (linked in the readme)
Most helpful comment
Can't modify a role with higher or equal highest role than yourself!Role hierarchy my friend. The highest role on the bot is below the one it is trying to assign.