Skip to content

Commit

Permalink
Fix fatal bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
JSH32 committed Jul 8, 2021
1 parent 5d0d601 commit ad4bccf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.riku32</groupId>
<artifactId>DiscordLink</artifactId>
<version>1.1</version>
<version>1.2</version>
<packaging>jar</packaging>

<name>DiscordLink</name>
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/com/github/riku32/discordlink/discord/Bot.java
Expand Up @@ -86,14 +86,15 @@ public Bot(DiscordLink plugin, String token, String guildID, String ownerID, Str
try {
commandsBuilder.build(jda, "com.github.riku32.discordlink.discord.commands");

// Delete botcommands framework listener

// TODO: Remove button listener without error
// jda.getEventManager().getRegisteredListeners().removeIf(listener -> listener instanceof ButtonListener);
} catch (IOException exception) {
plugin.getLogger().severe("Unable to register/update slash commands");
exception.printStackTrace();
}

// Delete botcommands framework listener
for (Object listener : jda.getRegisteredListeners())
if (listener instanceof ButtonListener)
jda.removeEventListener(listener);
}

public void shutdown() {
Expand Down

0 comments on commit ad4bccf

Please sign in to comment.