Fix warnings
This commit is contained in:
parent
9cc9bb13ad
commit
cc545f8e9b
@ -31,8 +31,7 @@ public class BlacklistUserCommand extends Command {
|
||||
}
|
||||
|
||||
// If the user is on the blacklist, remove them, otherwise, add them with the reason.
|
||||
UserBlacklistController.get(args[0]).thenAcceptAsync(possibleBlacklist -> {
|
||||
possibleBlacklist.ifPresentOrElse(blacklist -> {
|
||||
UserBlacklistController.get(args[0]).thenAcceptAsync(possibleBlacklist -> possibleBlacklist.ifPresentOrElse(blacklist -> {
|
||||
// Remove user from the blacklist
|
||||
UserBlacklistController.delete(blacklist).thenAcceptAsync((Void) -> {
|
||||
EmbedBuilder response = new EmbedBuilder()
|
||||
@ -54,10 +53,7 @@ public class BlacklistUserCommand extends Command {
|
||||
response.addField("With reason:", reason);
|
||||
}
|
||||
|
||||
UserBlacklistController.insert(blBuilder.build()).thenAcceptAsync((Void) -> {
|
||||
ctx.reply(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
UserBlacklistController.insert(blBuilder.build()).thenAcceptAsync((Void) -> ctx.reply(response));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user