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