tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::InputSticker Struct Reference

This object describes a sticker to be added to a sticker set. https://core.telegram.org/bots/api#inputsticker. More...

#include <InputSticker.hpp>

Public Member Functions

 InputSticker ()=default
 
 InputSticker (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::variant< cpr::File, std::string > sticker {""}
 The added sticker. More...
 
std::vector< std::string > emojiList
 List of 1-20 emoji associated with the sticker. More...
 
Ptr< MaskPositionmaskPosition
 Optional. Position where the mask should be placed on faces. For “mask” stickers only. More...
 
std::vector< std::string > keywords
 Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only. More...
 

Detailed Description

This object describes a sticker to be added to a sticker set. https://core.telegram.org/bots/api#inputsticker.

Definition at line 10 of file InputSticker.hpp.

Constructor & Destructor Documentation

◆ InputSticker() [1/2]

tgbotxx::InputSticker::InputSticker ( )
default

◆ InputSticker() [2/2]

tgbotxx::InputSticker::InputSticker ( const nl::json &  json)
inlineexplicit

Definition at line 12 of file InputSticker.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::InputSticker::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 49 of file InputSticker.hpp.

◆ toJson()

nl::json tgbotxx::InputSticker::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 35 of file InputSticker.hpp.

Member Data Documentation

◆ emojiList

std::vector<std::string> tgbotxx::InputSticker::emojiList

List of 1-20 emoji associated with the sticker.

Definition at line 24 of file InputSticker.hpp.

◆ keywords

std::vector<std::string> tgbotxx::InputSticker::keywords

Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.

Definition at line 31 of file InputSticker.hpp.

◆ maskPosition

Ptr<MaskPosition> tgbotxx::InputSticker::maskPosition

Optional. Position where the mask should be placed on faces. For “mask” stickers only.

Definition at line 27 of file InputSticker.hpp.

◆ sticker

std::variant<cpr::File, std::string> tgbotxx::InputSticker::sticker {""}

The added sticker.

  • Pass a file_id std::string to send a file that exists on the Telegram servers (recommended),
  • Pass an HTTP URL as an std::string for Telegram to get a .WEBP sticker from the Internet, or
  • Pass a cpr::File to upload a new .WEBP or .TGS sticker Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »

Definition at line 21 of file InputSticker.hpp.


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