GramIO API Reference / @gramio/files/dist / FileDownloadBot
Interface: FileDownloadBot
Defined in: files/index.d.ts:222
The minimal Bot-shaped object downloadFile needs. The GramIO Bot satisfies it structurally, so you just pass the instance — and a custom "without gramio" wrapper can pass any object of this shape.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
api | object | - | files/index.d.ts:223 |
api.getFile | TelegramFile | Promise<TelegramFile> | - | files/index.d.ts:224 |
options | object | - | files/index.d.ts:228 |
options.api | object | - | files/index.d.ts:230 |
options.api.baseURL | string | - | files/index.d.ts:231 |
options.files? | object | - | files/index.d.ts:233 |
options.files.baseURL? | string | Public base URL the working dir is served at (enables token-less links + source: "rewrite"). | files/index.d.ts:250 |
options.files.localDir? | string | Working directory of the local server — the prefix of the absolute file_path it returns. Default "/var/lib/telegram-bot-api" | files/index.d.ts:237 |
options.files.mountDir? | string | Where that working dir is mounted on the bot's side, when the bot and server share a volume at a different path. For source: "disk", the server path is remapped localDir → mountDir before reading. Defaults to localDir (same path — no remap). Example // server mounts the volume at /var/lib/telegram-bot-api, bot at /data { localDir: "/var/lib/telegram-bot-api", mountDir: "/data" } | files/index.d.ts:248 |
options.files.source? | FileSource | How to fetch bytes. Default "auto" | files/index.d.ts:235 |
options.token | string | - | files/index.d.ts:229 |