Layer 220
DocumentAttributeAudio
Represents an audio file
constructor
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Voice | flags.10?true | Whether this is a voice message |
| Duration | int | Duration in seconds |
| Title | flags.0?string | Name of song |
| Performer | flags.1?string | Performer |
| Waveform | flags.2?bytes | Waveform: consists in a series of bitpacked 5-bit values. Example implementation: android. |
Returns
DocumentAttributeGogram Example
// Creating DocumentAttributeAudio constructor obj := &tg.DocumentAttributeAudio{ Duration: 0, // Optional fields: // Voice: true, // Title: "...", // Performer: "...", // Waveform: []byte{}, }