Skip to content

GramIO API Reference / @gramio/contexts/dist / VoiceAttachment

Class: VoiceAttachment

Defined in: contexts/index.d.ts:936

This object represents a voice note.

Extends

Constructors

Constructor

new VoiceAttachment(payload): VoiceAttachment

Defined in: contexts/index.d.ts:327

Parameters

ParameterType
payloadTelegramVoice

Returns

VoiceAttachment

Inherited from

FileAttachment.constructor

Properties

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
attachmentTypepublicAttachmentTypeReturns attachment's type (e.g. 'audio', 'photo')FileAttachment.attachmentType-contexts/index.d.ts:937
payloadprotectedTelegramVoice--FileAttachment.payloadcontexts/index.d.ts:324

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:314

MDN

Returns

string

Inherited from

FileAttachment.[toStringTag]


duration

Get Signature

get duration(): number

Defined in: contexts/index.d.ts:939

Duration of the audio in seconds as defined by sender

Returns

number


fileId

Get Signature

get fileId(): string

Defined in: contexts/index.d.ts:329

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

Returns

string

Inherited from

FileAttachment.fileId


fileSize

Get Signature

get fileSize(): number

Defined in: contexts/index.d.ts:943

File size

Returns

number


fileUniqueId

Get Signature

get fileUniqueId(): string

Defined in: contexts/index.d.ts:334

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.

Returns

string

Inherited from

FileAttachment.fileUniqueId


mimeType

Get Signature

get mimeType(): string

Defined in: contexts/index.d.ts:941

MIME type of the file as defined by sender

Returns

string