Fix warnings

This commit is contained in:
Salmonllama 2020-11-24 14:31:21 -05:00
parent 9cc9bb13ad
commit cc545f8e9b

View File

@ -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));
}));
}
}