WIP: implemented registration and EULA accept, WIP on auth issue
This commit is contained in:
17
JOBot.TClient/Commands/Buttons/EulaAgreementButtonCommand.cs
Normal file
17
JOBot.TClient/Commands/Buttons/EulaAgreementButtonCommand.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using JOBot.Proto;
|
||||
using JOBot.TClient.Services;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
namespace JOBot.TClient.Commands.Buttons;
|
||||
|
||||
public class EulaAgreementButtonCommand(PrepareUserService prepareUserService) : IAuthorizedTelegramCommand
|
||||
{
|
||||
public async Task ExecuteAsync(Update update, GetUserResponse user, CancellationToken ct)
|
||||
{
|
||||
if (update.Type != UpdateType.Message || update.Message?.From == null)
|
||||
return;
|
||||
|
||||
await prepareUserService.AcceptEula(update, ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user