SwapDude/TelegramBot/Commands/CommandMessages/StartCommandMessage.cs
Lisoveliy aebe654c38
Some checks are pending
Deploy / update (push) Waiting to run
Build Project .NET / build (push) Waiting to run
chore: init commit from GitHub
2025-05-12 19:44:33 +03:00

20 lines
779 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.

using System.Diagnostics;
using System.Reflection;
using Telegram.Bot;
using Telegram.Bot.Types;
namespace TelegramBot.Commands.CommandMessages;
public class StartCommandMessage : CommandMessage
{
public const string CommandName = "/start";
public override async Task InvokeFromMessage(ITelegramBotClient botClient,
Update update,
CancellationToken cancellationToken)
{
var text = Program.Config.StartMessage;
text += $"\nBuild assembly version: {FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion}";
text += $"\n\nНововведения по комманде /changelog";
await botClient.SendTextMessageAsync(update.Message?.Chat!, text, cancellationToken: cancellationToken);
}
}