|
tgbot-cpp
|
This class holds all event listeners. More...
#include <EventBroadcaster.h>
Public Member Functions | |
| void | onAnyMessage (const MessageListener &listener) |
| Registers listener which receives new incoming message of any kind - text, photo, sticker, etc. | |
| void | onCommand (const std::string &commandName, const MessageListener &listener) |
| Registers listener which receives all messages with commands (messages with leading '/' char). | |
| void | onCommand (const std::initializer_list< std::string > &commandsList, const MessageListener &listener) |
| Registers listener which receives all messages with commands (messages with leading '/' char). | |
| void | onUnknownCommand (const MessageListener &listener) |
| Registers listener which receives all messages with commands (messages with leading '/' char) which haven't been handled by other listeners. | |
| void | onNonCommandMessage (const MessageListener &listener) |
| Registers listener which receives all messages without commands (messages with no leading '/' char). | |
| void | onEditedMessage (const MessageListener &listener) |
| Registers listener which receives new versions of a message that is known to the bot and was edited. | |
| void | onInlineQuery (const InlineQueryListener &listener) |
| Registers listener which receives new incoming inline queries. | |
| void | onChosenInlineResult (const ChosenInlineResultListener &listener) |
| Registers listener which receives the results of an inline query that was chosen by a user and sent to their chat partner. Please see https://core.telegram.org/bots/inline#collecting-feedback for details on how to enable these updates for your bot. | |
| void | onCallbackQuery (const CallbackQueryListener &listener) |
| Registers listener which receives new incoming callback queries. | |
| void | onShippingQuery (const ShippingQueryListener &listener) |
| Registers listener which receives new incoming shipping queries. Only for invoices with flexible price. | |
| void | onPreCheckoutQuery (const PreCheckoutQueryListener &listener) |
| Registers listener which receives new incoming pre-checkout queries. Contains full information about checkout. | |
| void | onPoll (const PollListener &listener) |
| Registers listener which receives new poll states. Bots receive only updates about stopped polls and polls, which are sent by the bot. | |
| void | onPollAnswer (const PollAnswerListener &listener) |
| Registers listener which receives an answer if a user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. | |
| void | onMyChatMember (const ChatMemberUpdatedListener &listener) |
| Registers listener which receives the bot's chat member status if it was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. | |
| void | onChatMember (const ChatMemberUpdatedListener &listener) |
| Registers listener which receives a status if a chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowedUpdates to receive these updates. | |
| void | onChatJoinRequest (const ChatJoinRequestListener &listener) |
| Registers listener which receives requests to join the chat. The bot must have the canInviteUsers administrator right in the chat to receive these updates. | |
| void | onMessageReaction (const MessageReactionUpdatedListener &listener) |
| Registers listener which receives new incoming message reaction update event. | |
| void | onMessageReactionCount (const MessageReactionCountUpdatedListener &listener) |
| Registers listener which receives new incoming message reaction count update event. | |
| void | onSuccessfulPayment (const SuccessfulPaymentListener &listener) |
| Registers listener which receives information about successful payments. This listener is triggered when a successful payment is received by the bot. | |
This class holds all event listeners.
Definition at line 34 of file EventBroadcaster.h.
| typedef std::function<void (const CallbackQuery::Ptr)> TgBot::EventBroadcaster::CallbackQueryListener |
Definition at line 42 of file EventBroadcaster.h.
| typedef std::function<void (const ChatJoinRequest::Ptr)> TgBot::EventBroadcaster::ChatJoinRequestListener |
Definition at line 48 of file EventBroadcaster.h.
| typedef std::function<void (const ChatMemberUpdated::Ptr)> TgBot::EventBroadcaster::ChatMemberUpdatedListener |
Definition at line 47 of file EventBroadcaster.h.
| typedef std::function<void (const ChosenInlineResult::Ptr)> TgBot::EventBroadcaster::ChosenInlineResultListener |
Definition at line 41 of file EventBroadcaster.h.
| typedef std::function<void (const InlineQuery::Ptr)> TgBot::EventBroadcaster::InlineQueryListener |
Definition at line 40 of file EventBroadcaster.h.
| typedef std::function<void (const Message::Ptr)> TgBot::EventBroadcaster::MessageListener |
Definition at line 39 of file EventBroadcaster.h.
| typedef std::function<void (const MessageReactionCountUpdated::Ptr)> TgBot::EventBroadcaster::MessageReactionCountUpdatedListener |
Definition at line 50 of file EventBroadcaster.h.
| typedef std::function<void (const MessageReactionUpdated::Ptr)> TgBot::EventBroadcaster::MessageReactionUpdatedListener |
Definition at line 49 of file EventBroadcaster.h.
| typedef std::function<void (const PollAnswer::Ptr)> TgBot::EventBroadcaster::PollAnswerListener |
Definition at line 46 of file EventBroadcaster.h.
| typedef std::function<void (const Poll::Ptr)> TgBot::EventBroadcaster::PollListener |
Definition at line 45 of file EventBroadcaster.h.
| typedef std::function<void (const PreCheckoutQuery::Ptr)> TgBot::EventBroadcaster::PreCheckoutQueryListener |
Definition at line 44 of file EventBroadcaster.h.
| typedef std::function<void (const ShippingQuery::Ptr)> TgBot::EventBroadcaster::ShippingQueryListener |
Definition at line 43 of file EventBroadcaster.h.
| typedef std::function<void (const Message::Ptr, const SuccessfulPayment::Ptr)> TgBot::EventBroadcaster::SuccessfulPaymentListener |
Definition at line 51 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming message of any kind - text, photo, sticker, etc.
| listener | Listener. |
Definition at line 57 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming callback queries.
| listener | Listener. |
Definition at line 137 of file EventBroadcaster.h.
|
inline |
Registers listener which receives requests to join the chat. The bot must have the canInviteUsers administrator right in the chat to receive these updates.
| listener | Listener. |
Definition at line 207 of file EventBroadcaster.h.
|
inline |
Registers listener which receives a status if a chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowedUpdates to receive these updates.
| listener | Listener. |
Definition at line 197 of file EventBroadcaster.h.
|
inline |
Registers listener which receives the results of an inline query that was chosen by a user and sent to their chat partner. Please see https://core.telegram.org/bots/inline#collecting-feedback for details on how to enable these updates for your bot.
| listener | Listener. |
Definition at line 129 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages with commands (messages with leading '/' char).
| commandsList | Commands names which listener can handle. |
| listener | Listener. Pass nullptr to remove listener of commands |
Definition at line 79 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages with commands (messages with leading '/' char).
| commandName | Command name which listener can handle. |
| listener | Listener. Pass nullptr to remove listener of command |
Definition at line 66 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new versions of a message that is known to the bot and was edited.
| listener | Listener. |
Definition at line 111 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming inline queries.
| listener | Listener. |
Definition at line 119 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming message reaction update event.
| listener | Listener. |
Definition at line 215 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming message reaction count update event.
| listener | Listener. |
Definition at line 223 of file EventBroadcaster.h.
|
inline |
Registers listener which receives the bot's chat member status if it was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.
| listener | Listener. |
Definition at line 187 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages without commands (messages with no leading '/' char).
| listener | Listener. |
Definition at line 103 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new poll states. Bots receive only updates about stopped polls and polls, which are sent by the bot.
| listener | Listener. |
Definition at line 167 of file EventBroadcaster.h.
|
inline |
Registers listener which receives an answer if a user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
| listener | Listener. |
Definition at line 177 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming pre-checkout queries. Contains full information about checkout.
| listener | Listener. |
Definition at line 157 of file EventBroadcaster.h.
|
inline |
Registers listener which receives new incoming shipping queries. Only for invoices with flexible price.
| listener | Listener. |
Definition at line 147 of file EventBroadcaster.h.
|
inline |
Registers listener which receives information about successful payments. This listener is triggered when a successful payment is received by the bot.
| listener | Listener. |
Definition at line 233 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages with commands (messages with leading '/' char) which haven't been handled by other listeners.
| listener | Listener. |
Definition at line 95 of file EventBroadcaster.h.