GramIO API Reference / @gramio/contexts/dist / File
Class: File
Defined in: contexts/index.d.ts:743
This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
Constructors
Constructor
new File(
payload):File
Defined in: contexts/index.d.ts:745
Parameters
| Parameter | Type |
|---|---|
payload | TelegramFile |
Returns
File
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramFile | contexts/index.d.ts:744 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:747
Returns
string
fileId
Get Signature
get fileId():
string
Defined in: contexts/index.d.ts:751
Identifier for this file, which can be used to download or reuse the file
Returns
string
filePath
Get Signature
get filePath():
string
Defined in: contexts/index.d.ts:764
File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
Returns
string
fileSize
Get Signature
get fileSize():
number
Defined in: contexts/index.d.ts:758
File size, if known
Returns
number
fileUniqueId
Get Signature
get fileUniqueId():
string
Defined in: contexts/index.d.ts:756
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