File Class
extends BaseRepresents a file ready to be downloaded. The file can be downloaded via the link
Properties
client: Client
fileId: string
filePath: string
fileSize: number
fileUniqueId: string
Methods
{ "id": 1285, "name": "File", "variant": "declaration", "kind": 128, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Represents a file ready to be downloaded. The file can be downloaded via the link " }, { "kind": "code", "text": "`https://api.telegram.org/file/bot<token>/<file_path>`" }, { "kind": "text", "text": ". 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." } ] }, "children": [ { "id": 1286, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 21, "character": 1 } ], "signatures": [ { "id": 1287, "name": "new File", "variant": "signature", "kind": 16384, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 21, "character": 1 } ], "parameters": [ { "id": 1288, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" } }, { "id": 1289, "name": "data", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "reference", "target": 1285, "name": "File", "package": "tgkit", "qualifiedName": "default" }, "overwrites": { "type": "reference", "target": -1, "name": "Base.constructor" } } ], "overwrites": { "type": "reference", "target": -1, "name": "Base.constructor" } }, { "id": 1294, "name": "client", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/Base.ts", "line": 4, "character": 1 } ], "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" }, "inheritedFrom": { "type": "reference", "target": -1, "name": "Base.client" } }, { "id": 1290, "name": "fileId", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Identifier for this file, which can be used to download or reuse the file" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 7, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 1293, "name": "filePath", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "File path" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 19, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 1292, "name": "fileSize", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true }, "comment": { "summary": [ { "kind": "text", "text": "File size in bytes, if known" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 16, "character": 1 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 1291, "name": "fileUniqueId", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Unique identifier for this file, which is supposed to be the same over time and for different bots.\nCan't be used to download or reuse the file." } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 13, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" } } ], "groups": [ { "title": "Constructors", "children": [ 1286 ] }, { "title": "Properties", "children": [ 1294, 1290, 1293, 1292, 1291 ] } ], "sources": [ { "fileName": "packages/tgkit/src/structures/File.ts", "line": 5, "character": 21 } ], "extendedTypes": [ { "type": "reference", "target": { "sourceFileName": "packages/tgkit/src/structures/Base.ts", "qualifiedName": "default" }, "name": "default", "package": "tgkit" } ] }