diff --git a/modules/bot/front/include/constants.hpp b/modules/bot/front/include/constants.hpp index 212a88f..0f24cae 100644 --- a/modules/bot/front/include/constants.hpp +++ b/modules/bot/front/include/constants.hpp @@ -11,4 +11,7 @@ namespace BotConstants { const std::string FIND_ANIME = "action:find_anime"; const std::string MY_TITLES = "navigation:my_titles"; } + namespace Text { + const std::string MAIN_MENU = "Вас приветствует nyanimedb бот:)\nЧего будем делать?"; + } } diff --git a/modules/bot/front/src/front.cpp b/modules/bot/front/src/front.cpp index d6a0b88..8294cfe 100644 --- a/modules/bot/front/src/front.cpp +++ b/modules/bot/front/src/front.cpp @@ -1,5 +1,6 @@ #include "front.hpp" #include "KeyboardFactory.hpp" +#include "constants.hpp" AnimeBot::AnimeBot(const std::string& token) : bot(token) { setupHandlers(); @@ -13,7 +14,7 @@ void AnimeBot::setupHandlers() { void AnimeBot::sendMainMenu(int64_t chatId) { auto keyboard = KeyboardFactory::createMainMenu(); - bot.getApi().sendMessage(chatId, "Главное меню", nullptr, nullptr, keyboard); + bot.getApi().sendMessage(chatId, BotConstants::Text::MAIN_MENU, nullptr, nullptr, keyboard); } TgBot::Bot& AnimeBot::getBot() {