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::uint32_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::uint64_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< PhotoSize > thumbnail { }
 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 607 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 608 of file Types.h.

Member Data Documentation

◆ duration

std::uint32_t TgBot::Audio::duration { }

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

Definition at line 622 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 613 of file Types.h.

◆ fileName

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

Optional. Original filename as defined by the sender.

Definition at line 634 of file Types.h.

◆ fileSize

std::optional<std::uint64_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 645 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 618 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 638 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 626 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 649 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 630 of file Types.h.


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