From d9ba821b884142775106aa3e40ddc27f40351392 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 14 May 2026 21:43:51 -0500 Subject: [PATCH] Use the HTML decoded message so regex matches don't have HTML entities --- KfChatDotNetBot/Services/BotCommands.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/KfChatDotNetBot/Services/BotCommands.cs b/KfChatDotNetBot/Services/BotCommands.cs index bfa1645..90c329e 100644 --- a/KfChatDotNetBot/Services/BotCommands.cs +++ b/KfChatDotNetBot/Services/BotCommands.cs @@ -42,16 +42,16 @@ internal class BotCommands internal void ProcessMessage(BotCommandMessageModel message) { - if (string.IsNullOrEmpty(message.MessageRaw)) + if (string.IsNullOrEmpty(message.MessageRawHtmlDecoded)) { return; } - var messageTrimmed = message.MessageRaw.TrimStart(CommandPrefix); + var messageTrimmed = message.MessageRawHtmlDecoded.TrimStart(CommandPrefix); foreach (var command in Commands) { var noPrefixCommand = HasAttribute(command); - if (!noPrefixCommand && !message.MessageRaw.StartsWith(CommandPrefix)) continue; + if (!noPrefixCommand && !message.MessageRawHtmlDecoded.StartsWith(CommandPrefix)) continue; foreach (var regex in command.Patterns) { var match = regex.Match(messageTrimmed);