JOBot/JOBot.TClient/Commands/IAuthorizedTelegramCommand.cs

15 lines
446 B
C#

using JOBot.Proto;
using Telegram.Bot;
using Telegram.Bot.Types;
namespace JOBot.TClient.Commands;
public interface IAuthorizedTelegramCommand : ITelegramCommand
{
public Task ExecuteAsync(Update update, GetUserResponse user, CancellationToken ct);
Task ITelegramCommand.ExecuteAsync(Update update, CancellationToken ct)
{
throw new UnauthorizedAccessException("You do not have permission to access this command.");
}
}