getting ready to refactor the handlers structure
This commit is contained in:
parent
45a1df4cbb
commit
ea29fa79f0
4 changed files with 45 additions and 10 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <string>
|
||||
#include <structs.hpp>
|
||||
|
||||
/// @brief Структура возвращаемого значения класса BotHandlers для изменения текущего сообщения
|
||||
struct HandlerResult {
|
||||
std::string message;
|
||||
TgBot::InlineKeyboardMarkup::Ptr keyboard;
|
||||
|
|
@ -9,5 +10,15 @@ struct HandlerResult {
|
|||
|
||||
class BotHandlers {
|
||||
public:
|
||||
static HandlerResult MyTitles(int64_t userId);
|
||||
void handleCallback(const TgBot::CallbackQuery::Ptr query);
|
||||
|
||||
private:
|
||||
TgBot::Api botApi;
|
||||
|
||||
void handleNavigation(const TgBot::CallbackQuery::Ptr query);
|
||||
|
||||
/// @brief Получить очередную страницу тайтлов из списка пользователя
|
||||
/// @param userId Идентификатор пользователя
|
||||
/// @return HandlerResult
|
||||
static HandlerResult returnMyTitles(int64_t userId);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue