From 5b97911e1860037e3357aa107bee60eab2761977 Mon Sep 17 00:00:00 2001 From: Andriy <30056636+West14@users.noreply.github.com> Date: Sun, 6 Oct 2024 22:34:14 +0300 Subject: [PATCH] fix(entertainment): golang regexp, add golang to /cooldowns output --- modules/Entertainment/Handler/Common.cs | 2 +- modules/Entertainment/Handler/Fun/Golang.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Entertainment/Handler/Common.cs b/modules/Entertainment/Handler/Common.cs index 8d8cd50..b5aa1e5 100644 --- a/modules/Entertainment/Handler/Common.cs +++ b/modules/Entertainment/Handler/Common.cs @@ -41,7 +41,7 @@ public class Common : BotEventHandler return; } - var cds = new[] { "python", "javascript" }; + var cds = new[] { "python", "javascript", "golang" }; var msg = new HtmlString().Bold("Кулдауны:").Br(); foreach (var cd in cds) diff --git a/modules/Entertainment/Handler/Fun/Golang.cs b/modules/Entertainment/Handler/Fun/Golang.cs index d2b1a45..1ad0a37 100644 --- a/modules/Entertainment/Handler/Fun/Golang.cs +++ b/modules/Entertainment/Handler/Fun/Golang.cs @@ -13,12 +13,12 @@ public class Golang : AbstractAnimationReply public Golang(CoreContext db, ILogger logger, ThreadSafeRandom rng) : base(db, logger, rng) { } protected override Regex AnimationMatch => - new("golang|go|го|голанг|голенг|гошка|(\\*\\.go)", + new(@"((? "golang"; [InChat(InChat.Public)] - [Command("setgolang")] + [Command("setgolang", CommandParseMode.Both)] public async Task HandleSetGolang() => await HandleSetAnimation(); [InChat(InChat.Public)]