|
| BasicBot (const std::string &token, std::string name="Bot", T *obj_ptr=nullptr) |
| Constuctor. More...
|
|
| BasicBot (const BasicBot &b, T *base_ptr) |
| Copy constructor. More...
|
|
void | setChatId (uint_fast32_t chat_id) |
| Set the chat id of the bot. More...
|
|
void | setChatId (int_fast64_t chat_id) |
| Set the chat id of the bot. More...
|
|
CommandHandler< T > & | commands () |
| Get command handler object. More...
|
|
Keyboard & | keyboard () |
| Get the keyboard handler. More...
|
|
std::shared_ptr< spdlog::logger > | logger () |
| Returns current bot's logger. More...
|
|
std::shared_ptr< spdlog::logger > | setLogger (spdlog::sink_ptr sink) |
| Set the bot's logger by passing a sink. More...
|
|
std::shared_ptr< spdlog::logger > | setLogger (std::vector< spdlog::sink_ptr > &sinks) |
| Set the bot's logger by passing a vector of sinks. More...
|
|
void | setLogger (std::shared_ptr< spdlog::logger > new_logger) |
| Set the bot's logger by passing a logger. More...
|
|
virtual void | init () |
| Init bot object.
|
|
const cpr::Response | executeRequest (const std::string &method, const cpr::Parameters ¶ms) |
| Execute an API method by passing method name and parameters. More...
|
|
bool | getUpdates (std::vector< types::Update > &updates, const uint_fast32_t offset=0, const uint_fast32_t limit=100, const uint_fast32_t timeout=60) |
| Receive incoming updates using polling (short or long polling based on timeout) More...
|
|
std::experimental::optional< const class types::Message > | sendMessage (const int_fast64_t chat_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=EParseMode::HTML, const bool disable_web_page_preview=true, const bool disable_notification=false, const int_fast32_t reply_to_message_id=0) |
| Send a message to a specified chat. (https://core.telegram.org/bots/api#sendmessage) More...
|
|
std::experimental::optional< const class types::Message > | sendMessage (const std::string &chat_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=EParseMode::HTML, const bool disable_web_page_preview=true, const bool disable_notification=false, const int_fast32_t reply_to_message_id=0) |
| Send a message to a specified chat. (https://core.telegram.org/bots/api#sendmessage) More...
|
|
std::experimental::optional< const class types::Message > | sendMessage (const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=EParseMode::HTML, const bool disable_web_page_preview=true, const bool disable_notification=false, const int_fast32_t reply_to_message_id=0) |
| Send a message to a specified chat. More...
|
|
bool | answerCallbackQuery (const std::string &text, bool show_alert=false, uint32_t cache_time=0, const std::string &url="") |
| Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. More...
|
|
std::experimental::optional< const class types::Message > | editMessageText (const int_fast64_t chat_id, const uint_fast32_t message_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=static_cast< EParseMode >(1), const bool disable_web_page_preview=true) |
| Edit text (and reply markup) of a message sent by the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageText (const std::string &chat_id, const uint_fast32_t message_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=static_cast< EParseMode >(1), const bool disable_web_page_preview=true) |
| Edit text (and reply markup) of a message sent by the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageText (const uint_fast32_t message_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=static_cast< EParseMode >(1), const bool disable_web_page_preview=true) |
| Edit text (and reply markup) of a message sent by the bot. More...
|
|
bool | editMessageText (const std::string &inline_message_id, const std::string &text, const std::string &reply_markup="", const EParseMode parse_mode=static_cast< EParseMode >(1), const bool disable_web_page_preview=true) |
| Edit text (and reply markup) of a message sent via the bot (using inline queries). More...
|
|
std::experimental::optional< const class types::Message > | editMessageCaption (const int_fast64_t chat_id, const uint_fast32_t message_id, const std::string &caption="", const std::string &reply_markup="") |
| Edit captions of messages sent by the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageCaption (const std::string &chat_id, const uint_fast32_t message_id, const std::string &caption="", const std::string &reply_markup="") |
| Edit captions of messages sent by the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageCaption (const uint_fast32_t message_id, const std::string &caption="", const std::string &reply_markup="") |
| Edit captions of messages sent by the bot. More...
|
|
bool | editMessageCaption (const std::string &inline_message_id, const std::string &caption, const std::string &reply_markup="") |
| Edit captions of messages sent via the bot (using inline_queries). More...
|
|
std::experimental::optional< const class types::Message > | editMessageReplyMarkup (const int_fast64_t chat_id, const uint_fast32_t message_id, const std::string &reply_markup="") |
| Edit only the reply markup of a message sent by the the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageReplyMarkup (const std::string &chat_id, const uint_fast32_t message_id, const std::string &reply_markup="") |
| Edit only the reply markup of a message sent by the the bot. More...
|
|
std::experimental::optional< const class types::Message > | editMessageReplyMarkup (const uint_fast32_t message_id, const std::string &reply_markup="") |
| Edit only the reply markup of a message sent by the the bot. More...
|
|
bool | editMessageReplyMarkup (const std::string &inline_message_id, const std::string &reply_markup="") |
|
bool | answerInlineQuery (const Json::Value &results, const uint_fast16_t cache_time=300, const bool is_personal=false, const std::string &next_offset="", const std::string &switch_pm_text="", const std::string &switch_pm_paramter="") |
| Answer an inline query. (https://core.telegram.org/bots/api#answerinlinequery) More...
|
|
template<class T>
class cppgram::BasicBot< T >
contains api methods, update handlers and listener.
The basic bot that contains all basic features.