chore: cleanup
This commit is contained in:
@@ -12,9 +12,6 @@ public class EulaAgreementButtonCommand(PrepareUserState prepareUserState) : IAu
|
||||
{
|
||||
public async Task ExecuteAsync(Update update, GetUserResponse user, CancellationToken ct)
|
||||
{
|
||||
if (update.Type != UpdateType.Message || update.Message?.From == null)
|
||||
return;
|
||||
|
||||
await prepareUserState.AcceptEula(update, ct);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace JOBot.TClient.Commands;
|
||||
namespace JOBot.TClient.Commands.Commands;
|
||||
|
||||
public class InfoCommand(ITelegramBotClient bot) : ITelegramCommand
|
||||
{
|
||||
@@ -2,7 +2,7 @@ using JOBot.Proto;
|
||||
using JOBot.TClient.Services;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace JOBot.TClient.Commands;
|
||||
namespace JOBot.TClient.Commands.Commands;
|
||||
|
||||
public class MenuCommand(MenuService menuService) : IAuthorizedTelegramCommand
|
||||
{
|
||||
@@ -1,9 +1,7 @@
|
||||
using JOBot.TClient.Commands.Buttons;
|
||||
using JOBot.TClient.Statements;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
namespace JOBot.TClient.Commands;
|
||||
namespace JOBot.TClient.Commands.Commands;
|
||||
|
||||
public class StartCommand(PrepareUserState prepareUserState) : ITelegramCommand
|
||||
{
|
||||
@@ -8,6 +8,8 @@ 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>
|
||||
Task ITelegramCommand.ExecuteAsync(Update update, CancellationToken ct)
|
||||
{
|
||||
throw new UnauthorizedAccessException("You do not have permission to access this command.");
|
||||
|
||||
Reference in New Issue
Block a user