feat?: replace ANSI codes and ZWSP for discord message with nothing so we can read the bot's log message easily from in game
This commit is contained in:
@@ -347,6 +347,10 @@ public class DiscordPlugin {
|
||||
message.getContentDisplay()
|
||||
// replaces skull emoji
|
||||
.replace("\uD83D\uDC80", "☠")
|
||||
// replaces all ANSI codes (used when a user reply to the bot's log message) with nothing
|
||||
.replaceAll("\u001B\\[[;\\d]*[ -/]*[@-~]", "")
|
||||
// replaces all ZWSP with nothing
|
||||
.replace("\u200b", "")
|
||||
);
|
||||
|
||||
final Component messageComponent = Component
|
||||
|
||||
Reference in New Issue
Block a user