mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
20 lines
425 B
C#
20 lines
425 B
C#
|
|
using System.Threading.Tasks;
|
||
|
|
using BotFramework;
|
||
|
|
using BotFramework.Attributes;
|
||
|
|
using BotFramework.Enums;
|
||
|
|
using Telegram.Bot;
|
||
|
|
|
||
|
|
namespace Kruzya.TelegramBot.Core;
|
||
|
|
|
||
|
|
public class Test : BotEventHandler
|
||
|
|
{
|
||
|
|
public uint Counter { get; set; } = 5;
|
||
|
|
|
||
|
|
|
||
|
|
[Command(InChat.All, "test_state")]
|
||
|
|
public async Task TestState()
|
||
|
|
{
|
||
|
|
Counter++;
|
||
|
|
await Bot.SendTextMessageAsync(Chat.Id, Counter.ToString());
|
||
|
|
}
|
||
|
|
}
|