Skip to content

Commit

Permalink
Discord: Strip ** from messages so that cross-server discord relay ch…
Browse files Browse the repository at this point in the history
…at looks nicer

Otherwise all messages appear as: (Discord) BotName: **user**: Message
  • Loading branch information
UnknownShadow200 committed Jan 23, 2023
1 parent 155a975 commit e05f035
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MCGalaxy/Modules/Relay/Discord/DiscordBot.cs
Expand Up @@ -296,8 +296,15 @@ public sealed class DiscordBot : RelayBot

sb.Remove(i, 1); length--;
}

StripMarkdown(sb);
return sb.ToString();
}

static void StripMarkdown(StringBuilder sb) {
// TODO proper markdown parsing
sb.Replace("**", "");
}


readonly object updateLocker = new object();
Expand Down

0 comments on commit e05f035

Please sign in to comment.