Started creating structure of bot interface

This commit is contained in:
Kirill 2025-11-18 17:30:43 +03:00
parent 879a7981cd
commit 602e9b62d8
8 changed files with 122 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#include "KeyboardFactory.hpp"
#include "constants.hpp"
TgBot::InlineKeyboardMarkup::Ptr KeyboardFactory::createMainMenu() {
auto keyboard = std::make_shared<TgBot::InlineKeyboardMarkup>();
TgBot::InlineKeyboardButton::Ptr button1(new TgBot::InlineKeyboardButton);
button1->text = BotConstants::Button::FIND_ANIME;
button1->callbackData = BotConstants::Callback::FIND_ANIME;
TgBot::InlineKeyboardButton::Ptr button2(new TgBot::InlineKeyboardButton);
button2->text = BotConstants::Button::MY_TITLES;
button2->callbackData = BotConstants::Callback::MY_TITLES;
keyboard->inlineKeyboard = {{button1, button2}};
return keyboard;
}