fix: discord enabled check in GrepLogCommand never works

This commit is contained in:
ChomeNS
2025-03-06 18:45:03 +07:00
parent e1eb52ce2e
commit f3b31bde85

View File

@@ -27,7 +27,9 @@ public class GrepLogCommand extends Command {
public Component execute(CommandContext context) throws CommandException {
final Bot bot = context.bot;
if (bot.discord.jda == null) throw new CommandException(Component.text("The bot's Discord integration has to be enabled to use the command."));
if (bot.discord == null || bot.discord.jda == null) {
throw new CommandException(Component.text("The bot's Discord integration has to be enabled to use the command."));
}
boolean ignoreCase = false;
boolean regex = false;