mirror of https://github.com/oliverbooth/VPLink
feat: strip markdown from Discord-sent messages
This commit is contained in:
parent
cb3c08ffe3
commit
70708e3eef
|
@ -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 />
|
||||
|
|
Loading…
Reference in New Issue