GramIO API Reference / @gramio/contexts/dist / DocumentAttachment
Class: DocumentAttachment
Defined in: contexts/index.d.ts:410
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:327
Parameters
| Parameter | Type |
|---|---|
payload | TelegramDocument |
Returns
DocumentAttachment
Inherited from
Properties
| Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|
attachmentType | public | AttachmentType | Returns attachment's type (e.g. 'audio', 'photo') | FileAttachment.attachmentType | - | contexts/index.d.ts:411 |
payload | protected | TelegramDocument | - | - | FileAttachment.payload | contexts/index.d.ts:324 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:314
Returns
string
Inherited from
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
fileName
Get Signature
get fileName():
string
Defined in: contexts/index.d.ts:415
Original filename as defined by sender
Returns
string
fileSize
Get Signature
get fileSize():
number
Defined in: contexts/index.d.ts:419
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
mimeType
Get Signature
get mimeType():
string
Defined in: contexts/index.d.ts:417
MIME type of the file as defined by sender
Returns
string
thumbnail
Get Signature
get thumbnail():
PhotoSize
Defined in: contexts/index.d.ts:413
Document thumbnail as defined by sender