JOBot/JOBot.TClient/Commands/StartCommand.cs
2025-05-01 22:29:49 +03:00

22 lines
1.0 KiB
C#

using JOBot.TClient.Core.Services;
using Telegram.Bot;
using Telegram.Bot.Types;
namespace JOBot.TClient.Commands;
public class StartCommand(ITelegramBotClient bot, UserService userService) : ITelegramCommand
{
private const string ReturnMessage = "Привет! Я JOBot, помощник по поиску работы в IT.";
public async Task ExecuteAsync(Update update, CancellationToken ct)
{
await userService.RegisterAsync(
update.Message!.Chat.Id,
update.Message.Chat.Username);
await bot.SendMessage(chatId: update.Message.Chat.Id,
"Продолжая, вы принимаете политику конфиденциальности и правила сервиса" +
"\nhttps://hh.ru/article/personal_data?backurl=%2F&role=applicant" +
"\nhttps://hh.ru/account/agreement?backurl=%2Faccount%2Fsignup%3Fbackurl%3D%252F%26role%3Dapplicant&role=applicant",
cancellationToken: ct);
}
}