|
@@ -0,0 +1,28 @@
|
|
|
+using System.Threading.Tasks;
|
|
|
+using MafiaTelegramBot.Models.Commands;
|
|
|
+using Telegram.Bot.Types;
|
|
|
+using Telegram.Bot.Types.Enums;
|
|
|
+using Telegram.Bot.Types.ReplyMarkups;
|
|
|
+
|
|
|
+namespace MafiaTelegramBot.Models.Inlines
|
|
|
+{
|
|
|
+ public class MakePrivateRoom : Query
|
|
|
+ {
|
|
|
+ protected override string Name => strings.make_private_room_callback;
|
|
|
+ public override async Task<Message> Execute(Update update)
|
|
|
+ {
|
|
|
+ var chatId = update.CallbackQuery.Message.Chat.Id;
|
|
|
+ await Bot.Get().SendChatActionAsync(chatId, ChatAction.Typing);
|
|
|
+
|
|
|
+ var message = "Выберите";
|
|
|
+
|
|
|
+ var inlineKeyboard = new InlineKeyboardMarkup(new[]
|
|
|
+ {
|
|
|
+ new[] {InlineKeyboardButton.WithCallbackData(strings.make_public_room, strings.make_public_room_callback)},
|
|
|
+ new[] {InlineKeyboardButton.WithCallbackData(strings.make_private_room, strings.make_private_room_callback)}
|
|
|
+ });
|
|
|
+
|
|
|
+ return await Bot.Get().SendTextMessageAsync(chatId, message, replyMarkup: inlineKeyboard);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|