mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
25 lines
837 B
C#
25 lines
837 B
C#
#nullable enable
|
|
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using BotFramework.Attributes;
|
|
using BotFramework.Enums;
|
|
using Kruzya.TelegramBot.Core.Data;
|
|
|
|
namespace West.Entertainment.Handler.Fun
|
|
{
|
|
public class Python : AbstractAnimationReply
|
|
{
|
|
protected override Regex AnimationMatch =>
|
|
new("питон|пайтон|python|путхон|питухон|петухон", RegexOptions.IgnoreCase);
|
|
|
|
protected override string GetAnimationName() => "python";
|
|
|
|
protected override bool CanHandle() => !Message!.Text!.Contains("/setpython");
|
|
|
|
[Command(InChat.Public, "setpython", CommandParseMode.Both)]
|
|
public async Task HandleSetPython() => await HandleSetAnimation();
|
|
|
|
public Python(CoreContext db) : base(db) { }
|
|
}
|
|
} |