mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-02 23:59:50 -04:00
Fix user mentions not resolving on bots
This commit is contained in:
parent
ecc95c9c7f
commit
6706ff95f1
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ namespace DiscordChatExporter.Services
|
|||
|
||||
// User mentions (<@id>)
|
||||
foreach (var mentionedUser in message.MentionedUsers)
|
||||
content = content.Replace($"<@{mentionedUser.Id}>", $"@{mentionedUser}");
|
||||
content = Regex.Replace(content, $"<@!?{mentionedUser.Id}>", $"@{mentionedUser}");
|
||||
|
||||
// Role mentions (<@&id>)
|
||||
foreach (var mentionedRole in message.MentionedRoles)
|
||||
|
@ -279,7 +279,7 @@ namespace DiscordChatExporter.Services
|
|||
// User mentions (<@id>)
|
||||
foreach (var mentionedUser in message.MentionedUsers)
|
||||
{
|
||||
content = content.Replace($"<@{mentionedUser.Id}>",
|
||||
content = Regex.Replace(content, $"<@!?{mentionedUser.Id}>",
|
||||
$"<span class=\"mention\" title=\"{HtmlEncode(mentionedUser)}\">" +
|
||||
$"@{HtmlEncode(mentionedUser.Name)}" +
|
||||
"</span>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue