From 20995124ca1ee560e9d06c065ab12709836996a0 Mon Sep 17 00:00:00 2001 From: Noikoio Date: Wed, 6 May 2020 17:56:11 -0700 Subject: [PATCH] Fix null exception --- RegexBot/Module/AutoMod/ConfigItem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/RegexBot/Module/AutoMod/ConfigItem.cs b/RegexBot/Module/AutoMod/ConfigItem.cs index f8795a3..c265aa1 100644 --- a/RegexBot/Module/AutoMod/ConfigItem.cs +++ b/RegexBot/Module/AutoMod/ConfigItem.cs @@ -157,6 +157,7 @@ namespace Noikoio.RegexBot.Module.AutoMod string msgcontent; if (MatchEmbed) msgcontent = SerializeEmbed(m.Embeds); else msgcontent = m.Content; + if (msgcontent == null) return false; // Min/max length check if (_msgMinLength != -1 && msgcontent.Length <= _msgMinLength) return false;