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

Arguments for Api::sendWidget. More...

#include <Types.h>

Public Attributes

std::variant< std::int64_t, std::string > chatId { }
 Unique identifier for the target chat or username of the target supergroup in the format @username.
std::string html { }
 HTML code of the widget, 1-32768 bytes. The code must not exceed 4096 bytes when compressed by zlib with the maximum compression level.
bool allowPaidBroadcast = false
 Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
bool allowQueries = false
 Pass True to allow the widget to send queries to the bot.
std::string caption = ""
 Widget caption, 0-1024 characters after entities parsing.
std::vector< std::shared_ptr< MessageEntity > > captionEntities = { }
 A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode.
std::string chatData = ""
 Data of the widget, which is specific to the message, 0-1024 bytes.
bool disableNotification = false
 Sends the message silently. Users will receive a notification with no sound.
std::uint32_t height = 0
 Height of the widget in logical pixels; omit if the height of the widget isn't fixed. The height is clamped by the app to the range 50-600.
bool isShared = false
 Pass True to create a shared widget, which can be sent again using the method sendSharedWidget.
std::string messageEffectId = ""
 Unique identifier of the message effect to be added to the message; for private chats only.
std::uint32_t messageThreadId = 0
 Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only.
std::string parseMode = ""
 Mode for parsing entities in the widget caption. See formatting options for more details.
bool protectContent = false
 Protects the contents of the sent message from forwarding and saving.
std::string publicData = ""
 Public data of the widget, 0-1024 bytes, which will be available wherever the widget is shown. If the widget is shared, then all messages with it will have the same public data.
std::variant< std::shared_ptr< InlineKeyboardMarkup >, std::shared_ptr< ReplyKeyboardMarkup >, std::shared_ptr< ReplyKeyboardRemove >, std::shared_ptr< ForceReply > > replyMarkup = { }
 Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
std::shared_ptr< ReplyParameters > replyParameters = nullptr
 Description of the message to reply to.
bool showCaptionAboveMedia = false
 Pass True if the caption must be shown above the widget.
std::uint32_t width = 0
 Width of the widget in logical pixels; omit if the widget must occupy the whole width of the message bubble. The width is clamped by the app to the range from 200 to the maximum width of the message bubble.

Detailed Description

Arguments for Api::sendWidget.

Definition at line 21320 of file Types.h.

Member Data Documentation

◆ allowPaidBroadcast

bool TgBot::SendWidgetArgs::allowPaidBroadcast = false

Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.

Definition at line 21338 of file Types.h.

◆ allowQueries

bool TgBot::SendWidgetArgs::allowQueries = false

Pass True to allow the widget to send queries to the bot.

Definition at line 21343 of file Types.h.

◆ caption

std::string TgBot::SendWidgetArgs::caption = ""

Widget caption, 0-1024 characters after entities parsing.

Definition at line 21348 of file Types.h.

◆ captionEntities

std::vector<std::shared_ptr<MessageEntity> > TgBot::SendWidgetArgs::captionEntities = { }

A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode.

Definition at line 21354 of file Types.h.

◆ chatData

std::string TgBot::SendWidgetArgs::chatData = ""

Data of the widget, which is specific to the message, 0-1024 bytes.

Definition at line 21359 of file Types.h.

◆ chatId

std::variant<std::int64_t, std::string> TgBot::SendWidgetArgs::chatId { }

Unique identifier for the target chat or username of the target supergroup in the format @username.

Definition at line 21325 of file Types.h.

◆ disableNotification

bool TgBot::SendWidgetArgs::disableNotification = false

Sends the message silently. Users will receive a notification with no sound.

Definition at line 21365 of file Types.h.

◆ height

std::uint32_t TgBot::SendWidgetArgs::height = 0

Height of the widget in logical pixels; omit if the height of the widget isn't fixed. The height is clamped by the app to the range 50-600.

Definition at line 21371 of file Types.h.

◆ html

std::string TgBot::SendWidgetArgs::html { }

HTML code of the widget, 1-32768 bytes. The code must not exceed 4096 bytes when compressed by zlib with the maximum compression level.

Definition at line 21331 of file Types.h.

◆ isShared

bool TgBot::SendWidgetArgs::isShared = false

Pass True to create a shared widget, which can be sent again using the method sendSharedWidget.

Definition at line 21377 of file Types.h.

◆ messageEffectId

std::string TgBot::SendWidgetArgs::messageEffectId = ""

Unique identifier of the message effect to be added to the message; for private chats only.

Definition at line 21383 of file Types.h.

◆ messageThreadId

std::uint32_t TgBot::SendWidgetArgs::messageThreadId = 0

Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only.

Definition at line 21390 of file Types.h.

◆ parseMode

std::string TgBot::SendWidgetArgs::parseMode = ""

Mode for parsing entities in the widget caption. See formatting options for more details.

Definition at line 21396 of file Types.h.

◆ protectContent

bool TgBot::SendWidgetArgs::protectContent = false

Protects the contents of the sent message from forwarding and saving.

Definition at line 21401 of file Types.h.

◆ publicData

std::string TgBot::SendWidgetArgs::publicData = ""

Public data of the widget, 0-1024 bytes, which will be available wherever the widget is shown. If the widget is shared, then all messages with it will have the same public data.

Definition at line 21408 of file Types.h.

◆ replyMarkup

std::variant<std::shared_ptr<InlineKeyboardMarkup>, std::shared_ptr<ReplyKeyboardMarkup>, std::shared_ptr<ReplyKeyboardRemove>, std::shared_ptr<ForceReply> > TgBot::SendWidgetArgs::replyMarkup = { }

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.

Definition at line 21417 of file Types.h.

◆ replyParameters

std::shared_ptr<ReplyParameters> TgBot::SendWidgetArgs::replyParameters = nullptr

Description of the message to reply to.

Definition at line 21422 of file Types.h.

◆ showCaptionAboveMedia

bool TgBot::SendWidgetArgs::showCaptionAboveMedia = false

Pass True if the caption must be shown above the widget.

Definition at line 21427 of file Types.h.

◆ width

std::uint32_t TgBot::SendWidgetArgs::width = 0

Width of the widget in logical pixels; omit if the widget must occupy the whole width of the message bubble. The width is clamped by the app to the range from 200 to the maximum width of the message bubble.

Definition at line 21434 of file Types.h.


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