Files
ChatBot/ChatBot/Services/Telegram/Commands/StartCommand.cs
Leonid Pershin 8f9da50318 add command
2025-10-15 22:11:33 +03:00

27 lines
926 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace ChatBot.Services.Telegram.Commands
{
/// <summary>
/// Команда /start
/// </summary>
[Command("/start", "Начать работу с ботом")]
public class StartCommand : TelegramCommandBase
{
private const string StartMessage =
"Привет! Я Никита. Задавайте мне любые вопросы, и я отвечу! 😊";
public StartCommand(ChatService chatService, ModelService modelService)
: base(chatService, modelService) { }
public override string CommandName => "/start";
public override string Description => "Начать работу с ботом";
public override Task<string> ExecuteAsync(
TelegramCommandContext context,
CancellationToken cancellationToken = default
)
{
return Task.FromResult(StartMessage);
}
}
}