chore: cleanup

This commit is contained in:
2025-07-25 16:37:42 +03:00
parent 7ceb8f656e
commit b15a77557e
28 changed files with 224 additions and 198 deletions

View File

@@ -1,17 +1,18 @@
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);
/// <exception cref="UnauthorizedAccessException">Throws if you try to use ITelegramCommand.ExecuteAsync
/// instead of IAuthorizedTelegramCommand.ExecuteAsync</exception>
/// <exception cref="UnauthorizedAccessException">
/// Throws if you try to use ITelegramCommand.ExecuteAsync
/// instead of IAuthorizedTelegramCommand.ExecuteAsync
/// </exception>
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);
}