From 0506d331c5dd9954d76fab622c9e1dd4ef10ef12 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 22 May 2025 12:01:24 -0400 Subject: [PATCH] modified "just google it" trigger see #30 --- Behavior/GeneralSnarkGooglit.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Behavior/GeneralSnarkGooglit.cs b/Behavior/GeneralSnarkGooglit.cs index 0a17455..fd7876b 100644 --- a/Behavior/GeneralSnarkGooglit.cs +++ b/Behavior/GeneralSnarkGooglit.cs @@ -20,15 +20,11 @@ public class GeneralSnarkGooglit : Behavior public override bool ShouldAct(Message message) { - return false; - } - // public override bool ShouldAct(Message message) - // { - // if(Behaver.Instance.IsSelf(message.Author.Id)) - // return false; + if (Behaver.Instance.IsSelf(message.Author.Id)) + return false; - // return Regex.IsMatch(message.Content, $"(just )?google( (it|that|things|before))?\\b", RegexOptions.IgnoreCase); - // } + return Regex.IsMatch(message.Content, $"(just )?google( (it|that|things|before))\\b", RegexOptions.IgnoreCase); + } public override async Task ActOn(Message message) { @@ -39,7 +35,7 @@ public class GeneralSnarkGooglit : Behavior break; case 1: var results = ""; - switch(Shared.r.Next(4)) + switch (Shared.r.Next(4)) { default: results = "\"curious about the best in ? click here to find out\", then i clicked there to find out. They didn't know either."; @@ -65,4 +61,4 @@ public class GeneralSnarkGooglit : Behavior } return true; } -} \ No newline at end of file +}