implemented auth, added auth tools AcceptNotPreparedAttribute.cs, IAuthorizedTelegramCommand.cs
14 lines
408 B
C#
14 lines
408 B
C#
using Telegram.Bot;
|
|
using Telegram.Bot.Types;
|
|
|
|
namespace JOBot.TClient.Commands;
|
|
|
|
public class InfoCommand(ITelegramBotClient bot) : ITelegramCommand
|
|
{
|
|
public async Task ExecuteAsync(Update update, CancellationToken ct)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(update.Message?.From);
|
|
|
|
await bot.SendMessage(update.Message.From.Id, TextResource.Info, cancellationToken: ct);
|
|
}
|
|
} |