mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
[+] Remove redundant comments
This commit is contained in:
parent
385fc77771
commit
f7556a4861
@ -411,14 +411,13 @@ public class Discord extends FreedomService
|
|||||||
message = StringUtils.remove(message, "§");
|
message = StringUtils.remove(message, "§");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch FS-191 start
|
|
||||||
Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message);
|
Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message);
|
||||||
|
|
||||||
while (DISCORD_MENTION_MATCHER.find()) {
|
while (DISCORD_MENTION_MATCHER.find()) {
|
||||||
String mention = DISCORD_MENTION_MATCHER.group(1);
|
String mention = DISCORD_MENTION_MATCHER.group(1);
|
||||||
message = message.replace(mention, mention.replace('@',' '));
|
message = message.replace(mention, mention.replace('@',' '));
|
||||||
}
|
}
|
||||||
// Patch FS-191 end
|
|
||||||
|
|
||||||
if (enabled && !chat_channel_id.isEmpty())
|
if (enabled && !chat_channel_id.isEmpty())
|
||||||
{
|
{
|
||||||
@ -445,15 +444,14 @@ public class Discord extends FreedomService
|
|||||||
message = StringUtils.remove(message, "§");
|
message = StringUtils.remove(message, "§");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch FS-191 start
|
|
||||||
Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message);
|
Matcher DISCORD_MENTION_MATCHER = this.DISCORD_MENTION_PATTERN.matcher(message);
|
||||||
|
|
||||||
while (DISCORD_MENTION_MATCHER.find()) {
|
while (DISCORD_MENTION_MATCHER.find()) {
|
||||||
String mention = DISCORD_MENTION_MATCHER.group(1);
|
String mention = DISCORD_MENTION_MATCHER.group(1);
|
||||||
message = message.replace(mention, mention.replace('@',' '));
|
message = message.replace(mention, mention.replace('@',' '));
|
||||||
}
|
}
|
||||||
// Patch FS-191 end
|
|
||||||
|
|
||||||
if (enabled && !chat_channel_id.isEmpty())
|
if (enabled && !chat_channel_id.isEmpty())
|
||||||
{
|
{
|
||||||
CompletableFuture<Message> sentMessage = Objects.requireNonNull(bot.getTextChannelById(chat_channel_id)).sendMessage(deformat(message)).submit(true);
|
CompletableFuture<Message> sentMessage = Objects.requireNonNull(bot.getTextChannelById(chat_channel_id)).sendMessage(deformat(message)).submit(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user