You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried splitting up replies into chunks of 2000 chars (that's the limit for each message), but it didn't work:
(the variable string is the response, by the way)
if(string != null) {
if(string.length() > 2000) {
// split into chunks of 2000
List<String> strings = new ArrayList<String>();
int index = 0;
int chunks = 2000;
while (index < string.length()) {
strings.add(string.substring(index, Math.min(index + chunks, string.length())));
index += chunks;
}
for(String s : strings) {
message.reply(string); // I know for a fact that `string` is set correctly and that the code to split messages into chunks is working. It is a problem with message.reply(string).
}
} else*/
message.reply(string);
}
There's no output or exceptions. No messages sent on discord. No nothing. It simply just does not work. I tried putting a Thread.sleep(1000) after the message.reply(string) to see if maybe a delay would work, but nope. I also tried making the message chunks 500 chars long, but that didn't work either. Honestly, I have no idea what to say.
The text was updated successfully, but these errors were encountered:
I tried splitting up replies into chunks of 2000 chars (that's the limit for each message), but it didn't work:
(the variable
string
is the response, by the way)There's no output or exceptions. No messages sent on discord. No nothing. It simply just does not work. I tried putting a
Thread.sleep(1000)
after themessage.reply(string)
to see if maybe a delay would work, but nope. I also tried making the message chunks 500 chars long, but that didn't work either. Honestly, I have no idea what to say.The text was updated successfully, but these errors were encountered: