diff --git a/modules/Entertainment/Handler/Fun/Golang.cs b/modules/Entertainment/Handler/Fun/Golang.cs new file mode 100644 index 0000000..d2b1a45 --- /dev/null +++ b/modules/Entertainment/Handler/Fun/Golang.cs @@ -0,0 +1,27 @@ +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using BotFramework.Attributes; +using BotFramework.Enums; +using Kruzya.TelegramBot.Core; +using Kruzya.TelegramBot.Core.Data; +using Microsoft.Extensions.Logging; + +namespace West.Entertainment.Handler.Fun; + +public class Golang : AbstractAnimationReply +{ + public Golang(CoreContext db, ILogger logger, ThreadSafeRandom rng) : base(db, logger, rng) { } + + protected override Regex AnimationMatch => + new("golang|go|го|голанг|голенг|гошка|(\\*\\.go)", + RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + protected override string GetAnimationName() => "golang"; + + [InChat(InChat.Public)] + [Command("setgolang")] + public async Task HandleSetGolang() => await HandleSetAnimation(); + + [InChat(InChat.Public)] + [Message(MessageFlag.HasText)] + public async Task HandleGolang() => await HandleAnimation(); +} \ No newline at end of file