style: clean up reply branch

This commit is contained in:
Oliver Booth 2023-08-27 17:02:30 +01:00
parent 1491f7fd86
commit 3882d77fbe
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
1 changed files with 4 additions and 1 deletions

View File

@ -107,11 +107,14 @@ internal sealed class DiscordMessageService : BackgroundService, IDiscordMessage
if (replyContent is not null)
{
IUser replyAuthor = fetchedMessage!.Author;
string name = fetchedMessage.Author.GetDisplayName();
_logger.LogInformation("Replying to {Author}: {Content}", replyAuthor, replyContent);
builder.Clear();
SanitizeContent(guild, replyContent, ref builder);
replyContent = builder.ToString();
messages.Add(new RelayedMessage(null!, $"↩️ Replying to {fetchedMessage.Author.GetDisplayName()}:", true));
messages.Add(new RelayedMessage(null!, $"↩️ Replying to {name}:", true));
messages.Add(new RelayedMessage(null!, replyContent, true));
}
}