mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Fix fun commands can block handler chain execution.
This commit is contained in:
@@ -25,14 +25,12 @@ namespace West.Entertainment.Handler.Fun
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
public override async Task<bool> HandleAnimation()
|
||||
public async Task HandleBayan()
|
||||
{
|
||||
if (await base.HandleAnimation())
|
||||
if (await HandleAnimation())
|
||||
{
|
||||
await Bot.DeleteMessageAsync(Chat.Id, Message!.MessageId);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override int? GetMessageIdToReply()
|
||||
|
||||
@@ -20,9 +20,11 @@ namespace West.Entertainment.Handler.Fun
|
||||
[Command(InChat.Public, "setjs", CommandParseMode.Both)]
|
||||
public async Task HandleSetJs()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
public override async Task<bool> HandleAnimation()
|
||||
=> await base.HandleAnimation();
|
||||
public async Task HandleJs()
|
||||
{
|
||||
await HandleAnimation();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,9 +23,10 @@ namespace West.Entertainment.Handler.Fun
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
public override async Task<bool> HandleAnimation()
|
||||
=> await base.HandleAnimation();
|
||||
|
||||
public async Task HandlePython()
|
||||
{
|
||||
await HandleAnimation();
|
||||
}
|
||||
|
||||
public Python(CoreContext db, ILogger<Python> logger) : base(db, logger) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user