CreateGameCommand.cs 587 B

123456789101112131415161718
  1. using System.Threading.Tasks;
  2. using Telegram.Bot;
  3. using Telegram.Bot.Types;
  4. using Telegram.Bot.Types.Enums;
  5. namespace MafiaTelegramBot.Models.Commands
  6. {
  7. public class CreateGameCommand : Command
  8. {
  9. protected override string Name => strings.create_game;
  10. protected override async Task<Message> Execute(Update update, TelegramBotClient client)
  11. {
  12. var chatId = update.Message.Chat.Id;
  13. await Bot.Get().SendChatActionAsync(chatId, ChatAction.Typing);
  14. return await Bot.Get().SendTextMessageAsync(chatId, Name);
  15. }
  16. }
  17. }