12345678910111213141516171819202122232425262728 |
- using System.Threading.Tasks;
- using Telegram.Bot;
- using Telegram.Bot.Types;
- using Telegram.Bot.Types.Enums;
- using Telegram.Bot.Types.ReplyMarkups;
- namespace MafiaTelegramBot.Models.Commands
- {
- public class StartCommand : Command
- {
- protected override string Name => "/start";
- protected override async Task<Message> Execute(Update update, TelegramBotClient client)
- {
- await Bot.Get().SendChatActionAsync(update.Message.Chat.Id, ChatAction.Typing);
- ReplyKeyboardMarkup keyboard = new(
- new[]
- {
- new KeyboardButton[] {strings.create_game},
- new KeyboardButton[] {strings.connect_game},
- new KeyboardButton[] {strings.show_profile}
- },
- true
- );
- return await Bot.Get().SendTextMessageAsync(update.Message.Chat.Id, strings.start_message, replyMarkup: keyboard);
- }
- }
- }
|