private boolean updateChannelStatus(CommandMessage context, TextChannel textChannel, boolean status) { textChannel.getManager().setNSFW(status).queue(aVoid -> { context.makeSuccess(context.i18n("updated")) .set("textChannel", textChannel.getAsMention()) .set("status", context.i18n("status." + (status ? "enabled" : "disabled"))) .queue(); }, throwable -> { context.makeError("Something went wrong while trying to update the channel status: " + throwable.getLocalizedMessage()) .queue(); }); return true; }