From e1ec7937fedc263982d4f2ba7ce93ffa58640e34 Mon Sep 17 00:00:00 2001 From: Andriy <30056636+West14@users.noreply.github.com> Date: Thu, 7 Jul 2022 17:02:47 +0300 Subject: [PATCH] [code-watcher] skip messages with lineCount < 2 --- modules/CodeWatcher/Handler.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/CodeWatcher/Handler.cs b/modules/CodeWatcher/Handler.cs index 81ba20c..7dc5f1f 100644 --- a/modules/CodeWatcher/Handler.cs +++ b/modules/CodeWatcher/Handler.cs @@ -34,6 +34,11 @@ public class Handler : BotEventHandler .SplitToLines() .ToList(); + if (entityLines.Count < 2) + { + continue; + } + if (entityLines.Count >= 20 || entityLines.Any(line => line.Length > 160)) { await DeleteAndNotifyAsync(message);