"Cannot build a Message with more than 2000 characters. Please limit your input."
thecenters opened this issue ยท 6 comments
I get this error as the server is starting up and with no players connected. It's consistent with every reboot. This error causes the console channel to not work. However, the regular chat channel still works.
06.07 00:23:28 [Server] WARN Exception in thread "DiscordSRV - Console Message Queue Worker" java.lang.IllegalStateException: Cannot build a Message with more than 2000 characters. Please limit your input.
06.07 00:23:28 [Server] WARN at github.scarsz.discordsrv.dependencies.jda.api.MessageBuilder.build(MessageBuilder.java:860)
06.07 00:23:28 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.queueMessage(DiscordUtil.java:448)
06.07 00:23:28 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.sendMessage(DiscordUtil.java:302)
06.07 00:23:28 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.sendMessage(DiscordUtil.java:260)
06.07 00:23:28 [Server] WARN at github.scarsz.discordsrv.objects.threads.ConsoleMessageQueueWorker.run(ConsoleMessageQueueWorker.java:47)
1.19.1-SNAPSHOT
I have a plugin that spams the console with warnings (it's to be expected and something I can't stop). I'm guessing that's over the character limit and so DiscordSRV crashes on it every time.
DiscordSRV checks & makes sure it's not trying to send anything over 2000 characters. Try updating to the latest development build, https://snapshot.discordsrv.com
Problem persists with latest dev version DiscordSRV-Build-1.19.2-SNAPSHOT-1594412798.jar
10.07 15:28:44 [Server] WARN Exception in thread "DiscordSRV - Console Message Queue Worker" java.lang.IllegalStateException: Cannot build a Message with more than 2000 characters. Please limit your input.
10.07 15:28:44 [Server] WARN at github.scarsz.discordsrv.dependencies.jda.api.MessageBuilder.build(MessageBuilder.java:860)
10.07 15:28:44 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.queueMessage(DiscordUtil.java:448)
10.07 15:28:44 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.sendMessage(DiscordUtil.java:302)
10.07 15:28:44 [Server] WARN at github.scarsz.discordsrv.util.DiscordUtil.sendMessage(DiscordUtil.java:260)
10.07 15:28:44 [Server] WARN at github.scarsz.discordsrv.objects.threads.ConsoleMessageQueueWorker.run(ConsoleMessageQueueWorker.java:47)
Snapshot, https://snapshot.discordsrv.com & check if a error appears in console when it's installed