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

This object represents an audio file to be treated as music by the Telegram clients. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<Audio>

Public Attributes

std::string fileId { }
 Identifier for this file, which can be used to download or reuse the file.
std::string fileUniqueId { }
 Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
std::int32_t duration { }
 Duration of the audio in seconds as defined by the sender.
std::optional< std::string > performer { }
 Optional. Performer of the audio as defined by the sender or by audio tags.
std::optional< std::string > title { }
 Optional. Title of the audio as defined by the sender or by audio tags.
std::optional< std::string > fileName { }
 Optional. Original filename as defined by the sender.
std::optional< std::string > mimeType { }
 Optional. MIME type of the file as defined by the sender.
std::optional< std::int64_t > fileSize { }
 Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
std::shared_ptr< PhotoSizethumbnail { }
 Optional. Thumbnail of the album cover to which the music file belongs.

Detailed Description

This object represents an audio file to be treated as music by the Telegram clients.

Definition at line 546 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 547 of file Types.h.

Member Data Documentation

◆ duration

std::int32_t TgBot::Audio::duration { }

Duration of the audio in seconds as defined by the sender.

Definition at line 563 of file Types.h.

◆ fileId

std::string TgBot::Audio::fileId { }

Identifier for this file, which can be used to download or reuse the file.

Definition at line 552 of file Types.h.

◆ fileName

std::optional<std::string> TgBot::Audio::fileName { }

Optional. Original filename as defined by the sender.

Definition at line 578 of file Types.h.

◆ fileSize

std::optional<std::int64_t> TgBot::Audio::fileSize { }

Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.

Definition at line 591 of file Types.h.

◆ fileUniqueId

std::string TgBot::Audio::fileUniqueId { }

Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.

Definition at line 558 of file Types.h.

◆ mimeType

std::optional<std::string> TgBot::Audio::mimeType { }

Optional. MIME type of the file as defined by the sender.

Definition at line 583 of file Types.h.

◆ performer

std::optional<std::string> TgBot::Audio::performer { }

Optional. Performer of the audio as defined by the sender or by audio tags.

Definition at line 568 of file Types.h.

◆ thumbnail

std::shared_ptr<PhotoSize> TgBot::Audio::thumbnail { }

Optional. Thumbnail of the album cover to which the music file belongs.

Definition at line 596 of file Types.h.

◆ title

std::optional<std::string> TgBot::Audio::title { }

Optional. Title of the audio as defined by the sender or by audio tags.

Definition at line 573 of file Types.h.


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