Skip to content

Commit

Permalink
Process all pending messages before shutting down the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 committed Feb 28, 2024
1 parent 6098ac4 commit b554d6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tk/sciwhiz12/concord/ChatBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ public void onReady(ReadyEvent event) {
void shutdown() {
Concord.LOGGER.info(BOT, "Shutting down Discord bot...");
messaging.allowProcessingMessages(false);
// Process all pending messages now
messaging.processMessages();
NeoForge.EVENT_BUS.unregister(msgListener);
NeoForge.EVENT_BUS.unregister(playerListener);
NeoForge.EVENT_BUS.unregister(statusListener);
Expand Down

0 comments on commit b554d6b

Please sign in to comment.