From 16e956d7189b6aede6fe2f9a4d12351e4a5ec473 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 15:53:49 +0100 Subject: [PATCH] fix button interactions --- .../bat/features/base/commands/general/HelpCommand.java | 2 +- .../fascinated/bat/features/tmdb/command/MovieSubCommand.java | 3 --- .../fascinated/bat/features/tmdb/command/SeriesSubCommand.java | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java index 52c094e..1e819ee 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java @@ -52,7 +52,7 @@ public class HelpCommand extends BatCommand implements EventListener { @Override public void onStringSelectInteraction(BatGuild guild, @NonNull BatUser user, @NonNull StringSelectInteractionEvent event) { - if (guild == null || event.getMember() == null) { + if (event.getMember() == null) { return; } if (!event.getComponentId().startsWith("help")) { diff --git a/src/main/java/cc/fascinated/bat/features/tmdb/command/MovieSubCommand.java b/src/main/java/cc/fascinated/bat/features/tmdb/command/MovieSubCommand.java index de7b2a1..6c3be71 100644 --- a/src/main/java/cc/fascinated/bat/features/tmdb/command/MovieSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/tmdb/command/MovieSubCommand.java @@ -106,9 +106,6 @@ public class MovieSubCommand extends BatCommand implements EventListener { @Override public void onButtonInteraction(BatGuild guild, @NonNull BatUser user, @NonNull ButtonInteractionEvent event) { - if (guild == null) { - return; - } Map params = userCommands.get(user.getId()); if (params == null) { return; diff --git a/src/main/java/cc/fascinated/bat/features/tmdb/command/SeriesSubCommand.java b/src/main/java/cc/fascinated/bat/features/tmdb/command/SeriesSubCommand.java index 57f6724..4895502 100644 --- a/src/main/java/cc/fascinated/bat/features/tmdb/command/SeriesSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/tmdb/command/SeriesSubCommand.java @@ -103,9 +103,6 @@ public class SeriesSubCommand extends BatCommand implements EventListener { @Override public void onButtonInteraction(BatGuild guild, @NonNull BatUser user, @NonNull ButtonInteractionEvent event) { - if (guild == null) { - return; - } Map params = userCommands.get(user.getId()); if (params == null) { return;