xxtelebot
1.4.1.0
A simple Telegram Bot implementation in C++
|
registers and holds callbacks for each type of update More...
#include <register_callback.h>
Public Types | |
using | MessageCallback = __T_UpdateCallback< types::Message > |
using | InlineQueryCallback = __T_UpdateCallback< types::InlineQuery > |
using | ChosenInlineResultCallback = __T_UpdateCallback< types::ChosenInlineResult > |
using | CallbackQueryCallback = __T_UpdateCallback< types::CallbackQuery > |
using | ShippingQueryCallback = __T_UpdateCallback< types::ShippingQuery > |
using | PreCheckoutQueryCallback = __T_UpdateCallback< types::PreCheckoutQuery > |
Public Member Functions | |
void | callback (bool(&matcherCallback)(const std::string &, const char *), void(&callback)(const types::Message, const methods::Api &, const std::vector< std::string >), const char *matchWord, const char sep= ' ') |
C-style function pointer callback overload, associate with command. More... | |
void | callback (bool(&matcherCallback)(const std::string &, const char *), std::function< void(const types::Message, const methods::Api &, const std::vector< std::string >)> callback, const char *matchWord, const char sep= ' ') |
std::function wrapper callback overload, associate with command (ability to use lambdas More... | |
void | callback (std::function< bool(const std::string &, const char *)> matcherCallback, void(&callback)(const types::Message, const methods::Api &, const std::vector< std::string >), const char *matchWord, const char sep= ' ') |
C-style function pointer callback overload, associate with command. More... | |
void | callback (std::function< bool(const std::string &, const char *)> matcherCallback, std::function< void(const types::Message, const methods::Api &, const std::vector< std::string >)> callback, const char *matchWord, const char sep= ' ') |
std::function wrapper callback overload, associate with command (ability to use lambdas More... | |
void | callback (void(&callback)(const types::Message, const methods::Api &)) |
Message update callback. More... | |
void | callback (MessageCallback callback) |
Message update callback. More... | |
void | callback (void(&callback)(const types::InlineQuery, const methods::Api &)) |
Inline query update callback. More... | |
void | callback (InlineQueryCallback callback) |
Inline query update callback. More... | |
void | callback (void(&callback)(const types::ChosenInlineResult, const methods::Api &)) |
Chosen inline result update callback. More... | |
void | callback (ChosenInlineResultCallback callback) |
void | callback (void(&callback)(const types::CallbackQuery, const methods::Api &)) |
Callback query update callback. More... | |
void | callback (CallbackQueryCallback callback) |
Callback query update callback. More... | |
void | callback (void(&callback)(const types::ShippingQuery, const methods::Api &)) |
Shipping query update callback. More... | |
void | callback (ShippingQueryCallback callback) |
Shipping query update callback. More... | |
void | callback (void(&callback)(const types::PreCheckoutQuery, const methods::Api &)) |
Pre checkout query update callback. More... | |
void | callback (PreCheckoutQueryCallback callback) |
Pre checkout query update callback. More... | |
void | callback (void(&callback)(const types::Message, const methods::Api &), const types::UpdateType &which) |
Multiple-options update callback. More... | |
void | callback (MessageCallback callback, const types::UpdateType updateType) |
Multiple-options update callback. More... | |
Protected Types | |
using | __Command_Tuple = std::tuple< const char *, std::function< bool(const std::string &, const char *)>, const char, std::function< void(const types::Message, const methods::Api &, const std::vector< std::string >)> > |
registers and holds callbacks for each type of update
|
inline |
C-style function pointer callback overload, associate with command.
matcherCallback,the | function responsible for giving result about the matching (see whenStarts() and whenContains()) |
callback,function | that gets called when string matches with given instructions |
matchWord,command | string (e.g. /say hello : matchWord = "/say ") |
sep,separator. | (space character by default) |
|
inline |
std::function wrapper callback overload, associate with command (ability to use lambdas
matcherCallback,the | function responsible for giving result about the matching (see whenStarts() and whenContains()) |
callback,function | that gets called when string matches with given instructions |
matchWord,command | string (e.g. /say hello : matchWord = "/say ") |
sep,separator. | (space character by default) |
|
inline |
C-style function pointer callback overload, associate with command.
matcherCallback,the | function responsible for giving result about the matching (see whenStarts() and whenContains()) |
callback,function | that gets called when string matches with given instructions |
matchWord,command | string (e.g. /say hello : matchWord = "/say ") |
sep,separator. | (space character by default) |
|
inline |
std::function wrapper callback overload, associate with command (ability to use lambdas
matcherCallback,the | function responsible for giving result about the matching (see whenStarts() and whenContains()) |
callback,function | that gets called when string matches with given instructions |
matchWord,command | string (e.g. /say hello : matchWord = "/say ") |
sep,separator. | (space character by default) |
|
inline |
Message update callback.
callback |
|
inline |
Message update callback.
callback |
|
inline |
Inline query update callback.
callback |
|
inline |
Inline query update callback.
callback |
|
inline |
Chosen inline result update callback.
callback |
|
inline |
Chosen inline result update callback
callback |
|
inline |
Callback query update callback.
callback |
|
inline |
Callback query update callback.
callback |
|
inline |
Shipping query update callback.
callback |
|
inline |
Shipping query update callback.
callback |
|
inline |
Pre checkout query update callback.
callback |
|
inline |
Pre checkout query update callback.
callback |
|
inline |
Multiple-options update callback.
callback | |
which | : accepted values: EDITED_MESSAGE, EDITED_CHANNEL_POST, CHANNEL_POST. Others ignored |
|
inline |
Multiple-options update callback.
callback | |
which | : accepted values: EDITED_MESSAGE, EDITED_CHANNEL_POST, CHANNEL_POST. Others ignored |