JOBot/JOBot.TClient/Commands/Buttons/EulaAgreementButtonCommand.cs
2025-07-25 16:37:42 +03:00

16 lines
504 B
C#

using JOBot.Proto;
using JOBot.TClient.Infrastructure.Attributes.Authorization;
using JOBot.TClient.Statements;
using Telegram.Bot.Types;
namespace JOBot.TClient.Commands.Buttons;
[AcceptNotPrepared]
public class EulaAgreementButtonCommand(PrepareUserState prepareUserState) : IAuthorizedTelegramCommand
{
public async Task ExecuteAsync(Update update, GetUserResponse user, CancellationToken ct)
{
if (!user.Eula)
await prepareUserState.AcceptEula(user, update, ct);
}
}