1 #ifndef CPPGRAM_COMMAND_HPP 2 #define CPPGRAM_COMMAND_HPP 7 #include "cppgram/basic_bot.hpp" 8 #include "cppgram/types/enums.hpp" 25 template <
class T>
class Command
35 : type( EUpdate::eMessage )
47 virtual void callClosure( T &,
const types::Update & ) = 0;
54 virtual bool isValid(
const types::Update & ) = 0;
64 bot.inline_query_id = inline_query_id;
74 bot.callback_query_id = callback_query_id;
const EUpdate type
type of the update for which the command will be triggered.
Definition: command.hpp:32
Abstract class for bot commands.
Definition: command_handler.hpp:15
void setInlineQueryId(std::string &inline_query_id, T &bot)
Set the inline query id of the bot for using AnswerInlineQuery.
Definition: command.hpp:62
main namespace for Cppgram
void setCallbackQueryId(std::string &callback_query_id, T &bot)
Set the callback query id the current update.
Definition: command.hpp:72