mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Assorted improvements.
- Move BotExtension to Core. - Update BotFramework - Fix Fun commands. - Remove ChatManagement dependency from Entertainment.
This commit is contained in:
@@ -13,13 +13,21 @@ namespace West.Entertainment.Handler.Fun
|
||||
protected override Regex AnimationMatch =>
|
||||
new("питон|пайтон|python|путхон|питухон|петухон", RegexOptions.IgnoreCase);
|
||||
|
||||
protected override string GetAnimationName() => "python";
|
||||
protected override string GetAnimationName()
|
||||
=> "python";
|
||||
|
||||
protected override bool CanHandle() => !Message!.Text!.Contains("/setpython");
|
||||
protected override bool CanHandle()
|
||||
=> !Message!.Text!.Contains("/setpython");
|
||||
|
||||
[Command(InChat.Public, "setpython", CommandParseMode.Both)]
|
||||
public async Task HandleSetPython() => await HandleSetAnimation();
|
||||
|
||||
public async Task HandleSetPython()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
public override async Task<bool> HandleAnimation()
|
||||
=> await base.HandleAnimation();
|
||||
|
||||
|
||||
public Python(CoreContext db) : base(db) { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user