20 lines
779 B
C#
20 lines
779 B
C#
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);
|
||
}
|
||
} |