chore: init commit from GitHub
This commit is contained in:
20
TelegramBot/Commands/CommandMessages/StartCommandMessage.cs
Normal file
20
TelegramBot/Commands/CommandMessages/StartCommandMessage.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user