tgbot-cpp
Loading...
Searching...
No Matches
TgBot::WidgetQuery Struct Reference

This object represents an incoming query from a widget in a message sent by the bot or via the bot. Use answerWidgetQuery to answer the query. Each user can send at most 5 queries per 5 seconds to the bot from all its widgets. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<WidgetQuery>

Public Attributes

std::string id { }
 Unique identifier for this query.
std::shared_ptr< User > from { }
 Sender.
std::shared_ptr< Chat > chat { }
 Optional. Chat with the message containing the widget; omitted if the widget is in an inline message.
std::optional< std::uint32_t > messageId { }
 Optional. Identifier of the message containing the widget; omitted if the widget is in an inline message.
std::optional< std::string > inlineMessageId { }
 Optional. Identifier of the inline message containing the widget.
std::string chatInstance { }
 Global identifier, uniquely corresponding to the chat to which the message with the widget was sent.
std::optional< std::string > chatType { }
 Optional. For widgets in inline messages, type of the chat to which the message was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”.
std::shared_ptr< WidgetQueryType > type { }
 Type of the query.
std::string data { }
 Data of the query, 1-64 bytes.
std::optional< std::string > widgetId { }
 Optional. Unique identifier of the shared widget, which sent the query; omitted if the widget isn't shared.

Detailed Description

This object represents an incoming query from a widget in a message sent by the bot or via the bot. Use answerWidgetQuery to answer the query. Each user can send at most 5 queries per 5 seconds to the bot from all its widgets.

Definition at line 14997 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::WidgetQuery::Ptr = std::shared_ptr<WidgetQuery>

Definition at line 14998 of file Types.h.

Member Data Documentation

◆ chat

std::shared_ptr<Chat> TgBot::WidgetQuery::chat { }

Optional. Chat with the message containing the widget; omitted if the widget is in an inline message.

Definition at line 15012 of file Types.h.

◆ chatInstance

std::string TgBot::WidgetQuery::chatInstance { }

Global identifier, uniquely corresponding to the chat to which the message with the widget was sent.

Definition at line 15026 of file Types.h.

◆ chatType

std::optional<std::string> TgBot::WidgetQuery::chatType { }

Optional. For widgets in inline messages, type of the chat to which the message was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”.

Definition at line 15032 of file Types.h.

◆ data

std::string TgBot::WidgetQuery::data { }

Data of the query, 1-64 bytes.

Definition at line 15040 of file Types.h.

◆ from

std::shared_ptr<User> TgBot::WidgetQuery::from { }

Sender.

Definition at line 15007 of file Types.h.

◆ id

std::string TgBot::WidgetQuery::id { }

Unique identifier for this query.

Definition at line 15003 of file Types.h.

◆ inlineMessageId

std::optional<std::string> TgBot::WidgetQuery::inlineMessageId { }

Optional. Identifier of the inline message containing the widget.

Definition at line 15021 of file Types.h.

◆ messageId

std::optional<std::uint32_t> TgBot::WidgetQuery::messageId { }

Optional. Identifier of the message containing the widget; omitted if the widget is in an inline message.

Definition at line 15017 of file Types.h.

◆ type

std::shared_ptr<WidgetQueryType> TgBot::WidgetQuery::type { }

Type of the query.

Definition at line 15036 of file Types.h.

◆ widgetId

std::optional<std::string> TgBot::WidgetQuery::widgetId { }

Optional. Unique identifier of the shared widget, which sent the query; omitted if the widget isn't shared.

Definition at line 15045 of file Types.h.


The documentation for this struct was generated from the following file: