Example #1
0
        public override async Task Execute(Message message, TelegramBotClient botClient, Client client)
        {
            var chatId = message.Chat.Id;
            // await botClient.SendTextMessageAsync(chatId, "", parseMode: Telegram.Bot.Types.Enums.ParseMode.Markdown);
            List <List <KeyboardButton> > buttonsList = new List <List <KeyboardButton> >();
            List <KeyboardButton>         buttons     = new List <KeyboardButton>();

            // int i = 0;
            foreach (Answer an in Quest.Answers)
            {
                buttons = new List <KeyboardButton>();
                var button = new Telegram.Bot.Types.ReplyMarkups.KeyboardButton();
                //button.RequestContact = true;
                button.Text = an.RightAnswer;
                buttons.Add(button);
                buttonsList.Add(buttons);
            }

            var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup(buttonsList);

            keyboard.ResizeKeyboard  = true;
            keyboard.OneTimeKeyboard = false;

            await botClient.SendTextMessageAsync(message.Chat.Id, Quest.Message, replyMarkup : keyboard, parseMode : Telegram.Bot.Types.Enums.ParseMode.Html);

            //    await botClient.SendTextMessageAsync(chatId, "Спс", parseMode: Telegram.Bot.Types.Enums.ParseMode.Markdown);
        }
Example #2
0
        public override async Task Execute(Message message, TelegramBotClient client)
        {
            try
            {
                await client.SendChatActionAsync(message.Chat.Id, Telegram.Bot.Types.Enums.ChatAction.Typing);

                RestApiClient.Сonfigure(AppSettings.VenusAiUri);
                ApiRequest inputMessage = new ApiRequest()
                {
                    Id          = message.Chat.Id,
                    Language    = "rus",
                    RequestType = "text",
                    TextData    = message.Text
                };
                var        jsonRequest   = JsonConverter.ToJson(inputMessage);
                var        jsonRespone   = RestApiClient.Post(jsonRequest);
                ApiRespone outputMessage = JsonConverter.FromJson <ApiRespone>(jsonRespone);
                var        keyboard      = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                {
                    Keyboard = new[]
                    {
                        new[] // row 1
                        {
                            new Telegram.Bot.Types.KeyboardButton("📝 исправить ответ 📝")
                        },
                    },
                    ResizeKeyboard = true
                };
                await client.SendTextMessageAsync(outputMessage.Id, outputMessage.OuputText, replyMarkup : keyboard);

                /*
                 * Replic inputR = new Replic()
                 * {
                 *  Id = message.Chat.Id,
                 *  Text = message.Text,
                 *  Time = message.Date
                 * };
                 * Replic outputR = new Replic()
                 * {
                 *  Id = 0,
                 *  Text = outputMessage.OuputText,
                 *  Time = message.Date
                 * };
                 * string[] lines = new string[]
                 * {
                 *  JsonConvert.SerializeObject(inputR),
                 *  JsonConvert.SerializeObject(outputR)
                 * };
                 * await System.IO.File.AppendAllLinesAsync($"{Environment.CurrentDirectory}\\{message.Chat.Id}.txt", lines);
                 */
            }
            catch (Exception ex)
            {
                Utils.Log.LogError(message.Chat.Id, ex.Message);
                await client.SendTextMessageAsync(message.Chat.Id, $"Произошла ошибка: `{ex.Message}`\nОбратитесь к @gosha20777", Telegram.Bot.Types.Enums.ParseMode.Markdown);
            }
        }
Example #3
0
        // true - master; false - player
        public ReplyKeyboardMarkup GetGuldReplyKeyboard(bool masterOrPlayer)
        {
            DateTime localDate     = DateTime.Now;
            DateTime startReadyWar = new DateTime(2018, 9, 9, 18, 50, 0);
            DateTime endReadyWar   = new DateTime(2018, 9, 9, 19, 0, 0);

            if (!(localDate.Hour >= startReadyWar.Hour && localDate.Hour < endReadyWar.Hour && localDate.Minute >= startReadyWar.Minute))
            {
                switch (masterOrPlayer)
                {
                case false:
                {
                    keyboardGuild = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                    {
                        Keyboard = new[]
                        {
                            new[]
                            {
                                new Telegram.Bot.Types.KeyboardButton(" Chat G"),
                                new Telegram.Bot.Types.KeyboardButton(" Work G")
                            },
                            new[]
                            {
                                new Telegram.Bot.Types.KeyboardButton(" Guild G "),
                                new Telegram.Bot.Types.KeyboardButton(" Back ")
                            },
                        },
                        ResizeKeyboard = true
                    };
                    return(keyboardGuild);
                }

                case true:
                {
                    return(new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                        {
                            Keyboard = new[]
                            {
                                new[]
                                {
                                    new Telegram.Bot.Types.KeyboardButton(" Setting G"),
                                    new Telegram.Bot.Types.KeyboardButton(" Chat G"),
                                    new Telegram.Bot.Types.KeyboardButton(" Work G")
                                },
                                new[]
                                {
                                    new Telegram.Bot.Types.KeyboardButton(" Guild G "),
                                    new Telegram.Bot.Types.KeyboardButton(" Back ")
                                },
                            },
                            ResizeKeyboard = true
                        });
                }
                }
            }
            return(keyboardGuild);
        }
Example #4
0
 public static bool sendImage(long chatId, string imageUrl, Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup keyboard, TelegramBotClient botClient)
 {
     try
     {
         var messageSent = botClient.SendPhotoAsync(
             chatId: chatId,
             photo: imageUrl,
             replyMarkup: keyboard
             );
         return(true);
     }
     catch
     {
         return(false);
     }
 }
        /// <summary>
        /// Вызывает команду
        /// </summary>
        /// <param name="message">принимает сообщение</param>
        /// <param name="client">Ссылка на экземпляр бота</param>
        public async void Execute(Message message, TelegramBotClient client)
        {
            var chatId    = message.Chat.Id;
            var messageId = message.MessageId;

            client.OnUpdate += async(object sender, UpdateEventArgs e) =>
            {
                if (e.Update.CallbackQuery != null || e.Update.InlineQuery != null)
                {
                    return;                                                                 // в этом блоке нам келлбэки и инлайны не нужны
                }
                var update      = e.Update;
                var upd_message = update.Message;
                if (upd_message == null)
                {
                    return;
                }
                if (upd_message.Type == Telegram.Bot.Types.Enums.MessageType.Text)
                {
                    //reply кнопки
                    var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                    {
                        Keyboard = new[] {
                            new[] // row 1
                            {
                                new KeyboardButton("Чпоньк"),
                                new KeyboardButton("Жамк"),
                            },
                        },
                        ResizeKeyboard = true
                    };
                    await client.SendTextMessageAsync(upd_message.Chat.Id, "Жамкни внизу!", replyMarkup : keyboard);

                    // обработка reply кнопок
                    if (upd_message.Text == "Чпоньк")
                    {
                        await client.SendTextMessageAsync(upd_message.Chat.Id, "Ты нажал на первую кнопку!", replyToMessageId : upd_message.MessageId);
                    }
                    if (upd_message.Text == "Жамк")
                    {
                        await client.SendTextMessageAsync(upd_message.Chat.Id, "Ты нажал на вторую кнопку!", replyToMessageId : upd_message.MessageId);
                    }
                }
            };
            client.StartReceiving();
        }
Example #6
0
        public override async Task Execute(BunkerUser user, ITelegramBotClient client)
        {
            CommandService         commandsInstance = Program.GetCommands;
            List <TelegramCommand> commands;

            if (user.IsHost)
            {
                commands = commandsInstance.GetAdmin();
            }
            else if (user.IsPlayer)
            {
                commands = commandsInstance.GetPlayer();
            }
            else
            {
                commands = commandsInstance.GetNew();
            }


            int b = commands.Count % 2 == 0 ? commands.Count / 2 : commands.Count / 2 + 1;

            int count = 0;

            KeyboardButton[][] buttons = new KeyboardButton[b][];

            for (int i = 0; i < b; i++)
            {
                if (commands.Count % 2 != 0 && i == b - 1)
                {
                    buttons[i] = new[] { new KeyboardButton($"{commands[count].Name}") };
                }
                else
                {
                    buttons[i] = new[] {
                        new KeyboardButton($"{commands[count].Name}"),
                        new KeyboardButton($"{commands[count+1].Name}")
                    };
                    count += 2;
                }
            }

            var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup(buttons);

            await client.SendTextMessageAsync(user.ChatID, "Choose option", replyMarkup : keyboard);
        }
Example #7
0
        public static string _Command_List(Options_Handler handler, out Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup keyboardButtons)
        {
            ReplyKeyboardMarkup replyKeyboardMarkup = new ReplyKeyboardMarkup();

            replyKeyboardMarkup.OneTimeKeyboard = true;
            if (!_Check_Logged_In(handler))
            {
                replyKeyboardMarkup.Keyboard = new KeyboardButton[][]
                {
                    new KeyboardButton[]
                    {
                        new KeyboardButton(_Get_Command_Value("Lang_Select", handler.Lang)),
                        new KeyboardButton(_Get_Command_Value("Search", handler.Lang))
                    },
                    new KeyboardButton[]
                    {
                        new KeyboardButton(_Get_Command_Value("Insert", handler.Lang)),
                        new KeyboardButton(_Get_Command_Value("Update", handler.Lang))
                    }
                }
            }
            ;
            else
            {
                replyKeyboardMarkup.Keyboard = new KeyboardButton[][]
                {
                    new KeyboardButton[]
                    {
                        new KeyboardButton(_Get_Command_Value("Lang_Select", handler.Lang)),
                        new KeyboardButton(_Get_Command_Value("Search", handler.Lang))
                    },
                    new KeyboardButton[]
                    {
                        new KeyboardButton(_Get_Command_Value("Manage", handler.Lang)),
                        new KeyboardButton(_Get_Command_Value("Insert", handler.Lang)),
                        new KeyboardButton(_Get_Command_Value("Update", handler.Lang))
                    }
                }
            };
            keyboardButtons = replyKeyboardMarkup;
            return(_Get_Command_Value("Welcome", handler.Lang));
        }
Example #8
0
 internal static void Send(string message, long id, bool clearKeyboard = false, ReplyKeyboardMarkup customMenu = null, Werewolf game = null)
 {
     //message = message.Replace("`",@"\`");
     if (clearKeyboard)
     {
         var menu = new ReplyKeyboardHide { HideKeyboard = true };
         Bot.SendTextMessage(id, message, replyMarkup: menu, disableWebPagePreview: true, parseMode: ParseMode.Html);
     }
     else if (customMenu != null)
     {
         Bot.SendTextMessage(id, message, replyMarkup: customMenu, disableWebPagePreview: true, parseMode: ParseMode.Html);
     }
     else
     {
         Bot.SendTextMessage(id, message, disableWebPagePreview: true, parseMode: ParseMode.Html);
     }
 }
Example #9
0
        public ViewGuild()
        {
            keyboardCreateChoose = new ReplyKeyboardMarkup
            {
                Keyboard = new[]
                {
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton("Create G"),
                        new Telegram.Bot.Types.KeyboardButton("Change G"),
                    },
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton(" Back "),
                    }
                },
                ResizeKeyboard = true
            };

            keyboardGuild = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
            {
                Keyboard = new[]
                {
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton(" Chat G"),
                        new Telegram.Bot.Types.KeyboardButton(" Work G")
                    },
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton(" Guild G"),
                        new Telegram.Bot.Types.KeyboardButton(" Back ")
                    },
                },
                ResizeKeyboard = true
            };

            keyboardGuildMasterSetting = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
            {
                Keyboard = new[]
                {
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton(" Invite G"),
                        new Telegram.Bot.Types.KeyboardButton(" Exclude G"),
                        new Telegram.Bot.Types.KeyboardButton(" Change chat G")
                    },
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton(" Change Hire status G"),
                        new Telegram.Bot.Types.KeyboardButton(" All members G"),
                        new Telegram.Bot.Types.KeyboardButton(" Guild G ")
                    },
                },
                ResizeKeyboard = true
            };


            keyboardWorkGuild = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
            {
                Keyboard = new[]
                {
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton("1. Easy job( 2 \U000026A1) G"),
                        new Telegram.Bot.Types.KeyboardButton("2. Normal job( 3 \U000026A1) G")
                    },
                    new[]
                    {
                        new Telegram.Bot.Types.KeyboardButton("3. Hard job( 4 \U000026A1) G"),
                        new Telegram.Bot.Types.KeyboardButton(" Guild G ")
                    },
                },
                ResizeKeyboard = true
            };

            keyboardInvite = new Telegram.Bot.Types.ReplyMarkups.InlineKeyboardMarkup(new Telegram.Bot.Types.InlineKeyboardButton[][]
            {
                new []
                {
                    new Telegram.Bot.Types.InlineKeyboardButton(" Accept ", "Accept G"),
                    new Telegram.Bot.Types.InlineKeyboardButton(" No ", "No G")
                }
            });

            guildHello           = "You are enter a guild house";
            workGuild            = "You see on the notice board some jobs: ";
            createGuild          = "Write a name of the guild after command /GCreate_. For example: /GCreate_GuildName. You need 1000 gold and 15 lvl";
            createGuildOk        = "You just create a new guild. Guildmaster!";
            createGuildFalseName = " Some things go wrong. Maybe this name is used";
            createGuildFalseGold = " Some things go wrong. You are too poor to be a guildmaster";
            createGuildFalseLvl  = " Some things go wrong. You are too young to be a guildmaster";

            settingGuildMaster = "What do you want to change guild master?";
            changeHire         = "You change hire statys";

            chatUrl       = "Plese write comand /GSetChatUrl_ and  your invite link (without https://t.me/)";
            chatUrlSucces = "All right. You changed succesfuly";
            chatUrlFail   = "Some thing gone wrong";

            invite        = "Write a name of the person after command /GInvite_. For example: /GInvite_PersonTest";
            exclude       = "Write a name of the person after command /GExlude_. For example: /GExlude_PersonTest";
            excludeSucces = "Exclude succes";
            excludeSuccesMessageToPlayer = "You was exclude from guild!";
            kikFailIMaster     = "You cant kik your self!";
            inviteFaileByName  = "We dont have such player!";
            inviteFaileByGuild = "This player is already a member of the guild!";
            inviteSucces       = "We send invite message";
            inviteAccepted     = "Player accept you invite!";

            leaveGuildSucces = "You leave this guild. So now try to find better";

            doSomeThingWrong = "I think you do some thing wrong!";
        }
        private static async void BotOnMessageReceived(object sender, MessageEventArgs messageEventArgs)
        {
            String Answer = "";

            string[] arrayChar =
            {
                "https://www.meme-arsenal.com/memes/382906c071b1656c03104e98775b99b7.jpg",
                "https://www.meme-arsenal.com/memes/c27ee50cd596b0bd73ce01b543246de6.jpg",
                "https://pbs.twimg.com/media/EVqEsClXsAQ7Mio.jpg",
                "https://cs.pikabu.ru/post_img/2013/09/01/8/1378039082_293717672.jpg",
                "https://i.pinimg.com/originals/5f/67/a6/5f67a64f65f27821a81a9193c97f9573.jpg"
            };

            Telegram.Bot.Types.Message msg = messageEventArgs.Message;
            //if (msg == null || msg.Type != MessageType.Document) return;
            //{
            //    Console.WriteLine(msg.Document.FileId);
            //    var file = await BOT.GetFileAsync(msg.Document.FileId);
            //    FileStream fs = new FileStream("C:\\Users\\anton\\OneDrive\\Рабочий стол\\DangerousSausages\\file.pdf", FileMode.Create);
            //    await BOT.DownloadFileAsync(file.FilePath, fs);
            //    fs.Close();
            //    fs.Dispose();
            //}

            if (msg == null || msg.Type != MessageType.Text)
            {
                return;
            }
            switch (msg.Text)
            {
            case "/start":
                Answer = "Чтобы узнать, что я умею напишите /help\n";
                break;

            case "/help":
                Answer = "Бот не может работать по следующему сценарию:\n\n" +
                         "1.отправляется файл frx на экспорт\n" +
                         "2.экспортируется в некий формат, например pdf\n" +
                         "3.возвращается\n\n" +
                         "Но зато, есть секретик на команду /memes\n";
                break;

            case "/status":
                Answer = "Пока не работает остальное, мы не можем добавить данную функцию\n";
                break;

            case "/memes":
                Answer = "Поздравляю, вы нашли ржумбу и открыли панель с клавишей)\n";
                break;

            case "Скрыть панель":
                Answer = "напишите команду заново";
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Для повторного вызова панели", replyMarkup : new ReplyKeyboardRemove());

                break;

            case "Мемесы:)":
                Answer = "Ржумба";
                await BOT.SendPhotoAsync(msg.Chat.Id, arrayChar[new Random().Next(0, arrayChar.Length)], " ");

                break;

            default:
                Answer = "В разработке";
                break;
            }
            await BOT.SendTextMessageAsync(msg.Chat.Id, Answer);


            if (msg.Text == "/memes")
            {
                var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                {
                    Keyboard = new[] {
                        new[]                         // row 5
                        {
                            new KeyboardButton("Мемесы:)"),
                        },
                        new[]                         // row 6
                        {
                            new KeyboardButton("Скрыть панель"),
                        },
                    },
                    ResizeKeyboard = true
                };
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Нажмите на клавишу, чтобы получить мемчик", replyMarkup : keyboard);
            }
        }
Example #11
0
        private static async void BotOnMessageReceived(object sender, MessageEventArgs messageEventArgs)
        {
            String Answer = "";


            Telegram.Bot.Types.Message msg = messageEventArgs.Message;
            if (msg == null || msg.Type != MessageType.Text)
            {
                return;
            }



            switch (msg.Text)
            {
            case "Факультет КТиИБ":
                Answer = "Ждём вас в нашем университете:)";
                break;

            case "Геолокация":
                Answer = "Адрес:\nг.Ростов-на-Дону, Большая Садовая 69\nhttps://inlnk.ru/qVOKz";
                break;

            case "Специальности":
                Answer = "В данном разделе мы можете посмотреть напрвления в нашем университете.";
                break;

            case "/start": Answer = "Добрый день!"; break;

            case "Скрыть панель":
                Answer = "Перейдите в /start";
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Для повторного вызова панели", replyMarkup : new ReplyKeyboardRemove());

                break;

            case "Аспирантура":
                using (SQLiteConnection Connect = new SQLiteConnection(@"Data Source=C:\Users\kaut1\Desktop\TestDB.db; Version=3;"))
                {
                    string        commandText = "SELECT * FROM [Aspirantura] WHERE [name] NOT NULL";
                    SQLiteCommand Command     = new SQLiteCommand(commandText, Connect);
                    Connect.Open();          // открыть соединение
                    SQLiteDataReader sqlReader = Command.ExecuteReader();
                    while (sqlReader.Read()) // считываем и вносим в лист все параметры
                    {
                        object all_task = " ";
                        object position = " ";
                        object name     = sqlReader["name"];
                        ;
                        all_task = sqlReader["exams"];
                        position = sqlReader["about"];
                        String All_Bakalavr = name + "\n\nОписание:\n" + position.ToString() + "\n\nЭкзамены(ЕГЭ):\n" + all_task.ToString();
                        await BOT.SendTextMessageAsync(msg.Chat.Id, All_Bakalavr);

                        Answer = "Подробнее:\nhttps://rsue.ru/abitur/aspirantura/programmi/";
                    }
                    Connect.Close();
                }
                break;

            case "Бакалавриат":
                using (SQLiteConnection Connect = new SQLiteConnection(@"Data Source=C:\Users\kaut1\Desktop\TestDB.db; Version=3;"))
                {
                    string        commandText = "SELECT * FROM [dbTableName] WHERE [name] NOT NULL";
                    SQLiteCommand Command     = new SQLiteCommand(commandText, Connect);
                    Connect.Open();          // открыть соединение
                    SQLiteDataReader sqlReader = Command.ExecuteReader();
                    while (sqlReader.Read()) // считываем и вносим в лист все параметры
                    {
                        object all_task   = " ";
                        object position   = " ";
                        object name       = sqlReader["name"];
                        object bal        = sqlReader["bal"];
                        object priceOch   = sqlReader["priceOch"];
                        object priceZaOch = sqlReader["priceZaOch"];
                        all_task = sqlReader["task"];
                        position = sqlReader["position"];

                        String All_Bakalavr = name + "\n\nОписание:\n" + position.ToString() + "\n\nЭкзамены(ЕГЭ):\n" + all_task.ToString() + "\n\nПроходной балл: " + bal.ToString() + "\n\nСтоимость обучения(очная/заочная): " + priceOch.ToString() + "/" + priceZaOch.ToString();
                        await BOT.SendTextMessageAsync(msg.Chat.Id, All_Bakalavr);

                        Answer = "Подробнее:\nhttp://ktib-rsue.ru/napravleniya-podgotovki.html";
                    }
                    Connect.Close();
                }
                break;

            case "Магистратура":
                using (SQLiteConnection Connect = new SQLiteConnection(@"Data Source=C:\Users\kaut1\Desktop\TestDB.db; Version=3;"))
                {
                    string        commandText = "SELECT * FROM [Specialitet] WHERE [name] NOT NULL";
                    SQLiteCommand Command     = new SQLiteCommand(commandText, Connect);
                    Connect.Open();          // открыть соединение
                    SQLiteDataReader sqlReader = Command.ExecuteReader();
                    while (sqlReader.Read()) // считываем и вносим в лист все параметры
                    {
                        object all_task = " ";
                        object position = " ";
                        object name     = sqlReader["name"];
                        all_task = sqlReader["exams"];
                        object priceOch   = sqlReader["priceOch"];
                        object priceZaOch = sqlReader["priceZaOch"];
                        position = sqlReader["about"];
                        String All_Bakalavr = name + "\n\nОписание:\n" + position.ToString() + "\n\nЭкзамены(ЕГЭ):\n" + all_task.ToString() + "\n\nСтоимость обучения(очная/заочная): " + priceOch.ToString() + "руб/" + priceZaOch.ToString() + "руб";
                        await BOT.SendTextMessageAsync(msg.Chat.Id, All_Bakalavr);

                        Answer = "Подробнее:\nhttp://magistratura.rsue.ru/umd.php";
                    }
                    Connect.Close();
                }
                break;

            case "Документы":

                string mesage = "Список Совета факультета\nhttps://inlnk.ru/WEVZQ ";
                await BOT.SendTextMessageAsync(msg.Chat.Id, mesage);

                mesage = "План работы Совета факультета\nhttps://inlnk.ru/qO44o";
                await BOT.SendTextMessageAsync(msg.Chat.Id, mesage);

                Answer = "Положение об факультете\nhttps://inlnk.ru/WyGG7";
                break;

            case "Контакты":
                Answer = "Приемная комиссия\nТелефон:\n+7 (863) 237-02-60\nПочта:\[email protected]\nПрниемная ректора\nТелефон:\n+7 (863) 263-30-80\nПочта:\[email protected]";
                break;


            default:
                Answer = "Перейдите в /start";
                break;
            }
            await BOT.SendTextMessageAsync(msg.Chat.Id, Answer);

            if (msg.Text == "Специальности")
            {
                var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                {
                    Keyboard = new[] {
                        new[]                         // row 1
                        {
                            new KeyboardButton("Бакалавриат"),
                            new KeyboardButton("Магистратура"),
                        },
                        new[]                         // row 1
                        {
                            new KeyboardButton("Аспирантура"),
                        },
                        new[]                         // row 2
                        {
                            new KeyboardButton("Скрыть панель"),
                        },
                    },
                    ResizeKeyboard = true
                };
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Что вас интересует?", replyMarkup : keyboard);
            }
            if (msg.Text == "/start")
            {
                var keyboard = new Telegram.Bot.Types.ReplyMarkups.ReplyKeyboardMarkup
                {
                    Keyboard = new[] {
                        new[]                         // row 1
                        {
                            new KeyboardButton("Специальности"),
                            new KeyboardButton("Документы"),
                        },
                        new[]                           // row 1
                        {
                            new KeyboardButton("Контакты"),
                            new KeyboardButton("Факультет КТиИБ"),
                        },
                        new[]                             // row 1
                        {
                            new KeyboardButton("Геолокация"),
                        },

                        new[]                         // row 2
                        {
                            new KeyboardButton("Скрыть панель"),
                        },
                    },
                    ResizeKeyboard = true
                };
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Выберете то, что вас интересует! ", replyMarkup : keyboard);
            }
            if (msg.Text == "Факультет КТиИБ")
            {
                var keyboard = new Telegram.Bot.Types.ReplyMarkups.InlineKeyboardMarkup(new[]
                {
                    new []     // first row
                    {
                        InlineKeyboardButton.WithUrl("Вконтакте", "https://vk.com/ktiib"),
                        InlineKeyboardButton.WithUrl("Инстаграм", "https://www.instagram.com/f.ktiib/"),
                    },
                    new []     // first row
                    {
                        InlineKeyboardButton.WithUrl("Наш сайт", "https://vk.com/away.php?to=http%3A%2F%2Fktib-rsue.ru"),
                    },
                });
                await BOT.SendTextMessageAsync(msg.Chat.Id, "Наши социальные сети!", replyMarkup : keyboard);
            }
        }