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

Arguments for Api::sendGift. More...

#include <Types.h>

Public Attributes

std::string giftId { }
 Identifier of the gift; limited gifts can't be sent to channel chats.
std::variant< std::int64_t, std::string > chatId = { }
 Required if user_id is not specified. Unique identifier for the chat that will receive the gift or username of the channel in the format @username.
bool payForUpgrade = false
 Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver.
std::string text = ""
 Text that will be shown along with the gift; 0-128 characters.
std::vector< std::shared_ptr< MessageEntity > > textEntities = { }
 A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
std::string textParseMode = ""
 Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
std::uint64_t userId = 0
 Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.

Detailed Description

Arguments for Api::sendGift.

Definition at line 19187 of file Types.h.

Member Data Documentation

◆ chatId

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

Required if user_id is not specified. Unique identifier for the chat that will receive the gift or username of the channel in the format @username.

Definition at line 19198 of file Types.h.

◆ giftId

std::string TgBot::SendGiftArgs::giftId { }

Identifier of the gift; limited gifts can't be sent to channel chats.

Definition at line 19191 of file Types.h.

◆ payForUpgrade

bool TgBot::SendGiftArgs::payForUpgrade = false

Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver.

Definition at line 19204 of file Types.h.

◆ text

std::string TgBot::SendGiftArgs::text = ""

Text that will be shown along with the gift; 0-128 characters.

Definition at line 19209 of file Types.h.

◆ textEntities

std::vector<std::shared_ptr<MessageEntity> > TgBot::SendGiftArgs::textEntities = { }

A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.

Definition at line 19217 of file Types.h.

◆ textParseMode

std::string TgBot::SendGiftArgs::textParseMode = ""

Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.

Definition at line 19224 of file Types.h.

◆ userId

std::uint64_t TgBot::SendGiftArgs::userId = 0

Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.

Definition at line 19230 of file Types.h.


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