DiscordSRV

DiscordSRV

86.8k Downloads

"Cannot build a Message with more than 2000 characters. Please limit your input."

thecenters opened this issue ยท 6 comments

commented

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)

commented

Can't reproduce. What version of DiscordSRV are you running?

commented

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.

commented

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

commented

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)
commented

Snapshot, https://snapshot.discordsrv.com & check if a error appears in console when it's installed

commented

I'm not getting the error anymore, but DiscordSRV console channel still stops working at the same point.