Skip to content

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

Class: FileAttachment<T> ​

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

Attachment with fileId and fileUniqueId properties

Extends ​

Extended by ​

Type Parameters ​

Type ParameterDefault type
T extends DefaultAttachmentDefaultAttachment

Constructors ​

Constructor ​

new FileAttachment<T>(payload): FileAttachment<T>

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

Parameters ​

ParameterType
payloadT

Returns ​

FileAttachment<T>

Overrides ​

Attachment.constructor

Properties ​

PropertyModifierTypeDescriptionOverridesDefined in
attachmentType?publicAttachmentTypeReturns attachment's type (e.g. 'audio', 'photo')Attachment.attachmentTypecontexts/index.d.ts:424
payloadprotectedT--contexts/index.d.ts:422

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string

Inherited from ​

Attachment.[toStringTag]


fileId ​

Get Signature ​

get fileId(): string

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

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

Returns ​

string


fileUniqueId ​

Get Signature ​

get fileUniqueId(): string

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

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