Skip to content

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

Class: DocumentAttachment

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

This object represents a general file (as opposed to photos, voice messages and audio files).

Extends

Constructors

Constructor

new DocumentAttachment(payload): DocumentAttachment

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

Parameters

ParameterType
payloadTelegramDocument

Returns

DocumentAttachment

Inherited from

FileAttachment.constructor

Properties

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

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string

Inherited from

FileAttachment.[toStringTag]


fileId

Get Signature

get fileId(): string

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

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

Returns

string

Inherited from

FileAttachment.fileId


fileName

Get Signature

get fileName(): string

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

Original filename as defined by sender

Returns

string


fileSize

Get Signature

get fileSize(): number

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

File size

Returns

number


fileUniqueId

Get Signature

get fileUniqueId(): string

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

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:425

MIME type of the file as defined by sender

Returns

string


thumbnail

Get Signature

get thumbnail(): PhotoSize

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

Document thumbnail as defined by sender

Returns

PhotoSize