feat: strip markdown from Discord-sent messages

This commit is contained in:
Oliver Booth 2023-08-26 22:39:03 +01:00
parent cb3c08ffe3
commit 70708e3eef
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
using System.Drawing;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Discord;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using VPLink.Common.Configuration;
@ -8,7 +8,9 @@ using VPLink.Common.Data;
using VPLink.Common.Services;
using VpSharp;
using VpSharp.Entities;
using Color = System.Drawing.Color;
using FontStyle = VpSharp.FontStyle;
using MessageType = VpSharp.MessageType;
namespace VPLink.Services;
@ -45,7 +47,9 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua
Color color = Color.FromArgb((int)configuration.Color);
FontStyle style = configuration.Style;
return _virtualParadiseClient.SendMessageAsync(message.Author, message.Content, style, color);
string content = Format.StripMarkDown(message.Content);
return _virtualParadiseClient.SendMessageAsync(message.Author, content, style, color);
}
/// <inheritdoc />