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