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 JavaScript : AbstractAnimationReply { public JavaScript(CoreContext db, ILogger logger, ThreadSafeRandom rng) : base(db, logger, rng) { } protected override Regex AnimationMatch => new( @"((? "javascript"; [InChat(InChat.Public)] [Command("setjs", CommandParseMode.Both)] public async Task HandleSetJs() => await HandleSetAnimation(); [InChat(InChat.Public)] [Message(MessageFlag.HasText)] public async Task HandleJs() { await HandleAnimation(); } } }