[+] Fix #replace()

This commit is contained in:
abhiram 2021-04-12 16:31:48 +05:30
parent 4c67553bdd
commit 0c2f0a714c

View File

@ -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())