mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Update to Telegram Bot Framework 2.0
This commit is contained in:
@@ -23,12 +23,14 @@ namespace West.Entertainment.Handler.Fun
|
||||
|
||||
protected override string GetAnimationName()
|
||||
=> "bayan";
|
||||
|
||||
[Command(InChat.Public, "setbayan", CommandParseMode.Both)]
|
||||
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setbayan", CommandParseMode.Both)]
|
||||
public async Task HandleSetBayan()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
[InChat(InChat.Public)]
|
||||
[Message(MessageFlag.HasText)]
|
||||
public async Task HandleBayan()
|
||||
{
|
||||
if (await HandleAnimation())
|
||||
|
||||
@@ -17,12 +17,14 @@ namespace West.Entertainment.Handler.Fun
|
||||
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
|
||||
protected override string GetAnimationName() => "javascript";
|
||||
|
||||
[Command(InChat.Public, "setjs", CommandParseMode.Both)]
|
||||
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setjs", CommandParseMode.Both)]
|
||||
public async Task HandleSetJs()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
[InChat(InChat.Public)]
|
||||
[Message(MessageFlag.HasText)]
|
||||
public async Task HandleJs()
|
||||
{
|
||||
await HandleAnimation();
|
||||
|
||||
@@ -18,12 +18,14 @@ namespace West.Entertainment.Handler.Fun
|
||||
|
||||
protected override string GetAnimationName()
|
||||
=> "python";
|
||||
|
||||
[Command(InChat.Public, "setpython", CommandParseMode.Both)]
|
||||
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setpython", CommandParseMode.Both)]
|
||||
public async Task HandleSetPython()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[Message(InChat.Public, MessageFlag.HasText)]
|
||||
[InChat(InChat.Public)]
|
||||
[Message(MessageFlag.HasText)]
|
||||
public async Task HandlePython()
|
||||
{
|
||||
await HandleAnimation();
|
||||
|
||||
Reference in New Issue
Block a user