How to check is an user has a role on discord
问题 I am struggling to find a way to check if an user has a role. I know how to find a certain role: public Role findRole(Guild guild, String name) { List<Role> roles = guild.getRolesByName(name, true); if (roles.size() <= 0) { throw new RuntimeException("Role with name " + name + " on Guild " + guild.getName() + " not found!"); } else { return roles.get(0); } } and i have a role: Role neededEole=findRole(event.getGuild(),"Admin"); I know how to search an user: String user=event.getAuthor().getId