I cant seem to figure out how to check if a user is already banned if tried this event.getGuild().retrieveBan(event.getUser()
but you cant use an if statement with it
Advertisement
Answer
You should use the failure and success callbacks:
JavaScript
x
guild.retrieveBan(user).queue(
(success) -> {
// the user is banned
},
(failure) -> {
// the user is not banned
}
);