diff --git a/src/main/java/tk/sciwhiz12/concord/ChatBot.java b/src/main/java/tk/sciwhiz12/concord/ChatBot.java index d48e281e..4d81ffcc 100644 --- a/src/main/java/tk/sciwhiz12/concord/ChatBot.java +++ b/src/main/java/tk/sciwhiz12/concord/ChatBot.java @@ -147,7 +147,7 @@ void shutdown() { Concord.LOGGER.info(BOT, "Shutting down Discord bot..."); messaging.allowProcessingMessages(false); // Process all pending messages now - messaging.processMessages(); + messaging.processMessages(true); NeoForge.EVENT_BUS.unregister(msgListener); NeoForge.EVENT_BUS.unregister(playerListener); NeoForge.EVENT_BUS.unregister(statusListener); diff --git a/src/main/java/tk/sciwhiz12/concord/msg/Messaging.java b/src/main/java/tk/sciwhiz12/concord/msg/Messaging.java index 657a9df3..f00e23fc 100644 --- a/src/main/java/tk/sciwhiz12/concord/msg/Messaging.java +++ b/src/main/java/tk/sciwhiz12/concord/msg/Messaging.java @@ -92,7 +92,12 @@ public void allowProcessingMessages(boolean processMessages) { } public void processMessages() { - if (!processMessages) return; + this.processMessages(false); + } + + @ApiStatus.Internal + public void processMessages(boolean bypass) { + if (!processMessages && !bypass) return; // TODO: rate-limiting MessageEntry entry;