fix? or no or mabe or idk
This commit is contained in:
@@ -285,6 +285,8 @@ public class DiscordPlugin {
|
||||
"\n```"
|
||||
, channelId
|
||||
);
|
||||
|
||||
logMessages.clear();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -298,6 +300,7 @@ public class DiscordPlugin {
|
||||
final Map<String, Boolean> doneSendingInLogs = new HashMap<>();
|
||||
|
||||
public void sendMessage(String message, String channelId) {
|
||||
if (message.length() > 32767) return;
|
||||
synchronized (logMessages) {
|
||||
if (!logMessages.containsKey(channelId)) {
|
||||
logMessages.put(channelId, new StringBuilder());
|
||||
|
||||
@@ -158,7 +158,8 @@ public class Logger {
|
||||
logWriter.write("\n");
|
||||
}
|
||||
|
||||
logWriter.write(getTimePrefix() + str.replaceAll("\\[(\\d+?)x](?=$|[\r\n])", "[/$1x]")); // the replaceAll will prevent conflicts with the duplicate counter
|
||||
if (str.length() > 32767) logWriter.write("Message too big, not logging this message"); // should these stuff be hardcoded?
|
||||
else logWriter.write(getTimePrefix() + str.replaceAll("\\[(\\d+?)x](?=$|[\r\n])", "[/$1x]")); // the replaceAll will prevent conflicts with the duplicate counter
|
||||
logWriter.flush();
|
||||
|
||||
duplicateCounter = 1;
|
||||
|
||||
Reference in New Issue
Block a user