From 0c2f0a714c90e35e3bdf77a231509debc8b13cdf Mon Sep 17 00:00:00 2001 From: abhiram Date: Mon, 12 Apr 2021 16:31:48 +0530 Subject: [PATCH] [+] Fix #replace() --- .../me/totalfreedom/totalfreedommod/discord/Discord.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java index e656868a..484d6016 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java @@ -412,12 +412,12 @@ public class Discord extends FreedomService } - Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message); + Matcher DISCORD_MENTION_MATCHER = DISCORD_MENTION_PATTERN.matcher(message); while (DISCORD_MENTION_MATCHER.find()) { String mention = DISCORD_MENTION_MATCHER.group(1); - message = message.replace(mention, mention.replace('@','')); + message = message.replace(mention, mention.replace("@","")); } if (enabled && !chat_channel_id.isEmpty()) @@ -446,12 +446,12 @@ public class Discord extends FreedomService } - Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message); + Matcher DISCORD_MENTION_MATCHER = DISCORD_MENTION_PATTERN.matcher(message); while (DISCORD_MENTION_MATCHER.find()) { String mention = DISCORD_MENTION_MATCHER.group(1); - message = message.replace(mention, mention.replace('@','')); + message = message.replace(mention, mention.replace("@","")); } if (enabled && !chat_channel_id.isEmpty())