Skip to content

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

PropertyTypeDescriptionDefined in
apiobject-files/index.d.ts:223
api.getFileTelegramFile | Promise<TelegramFile>-files/index.d.ts:224
optionsobject-files/index.d.ts:228
options.apiobject-files/index.d.ts:230
options.api.baseURLstring-files/index.d.ts:231
options.files?object-files/index.d.ts:233
options.files.baseURL?stringPublic base URL the working dir is served at (enables token-less links + source: "rewrite").files/index.d.ts:250
options.files.localDir?stringWorking 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?stringWhere 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 localDirmountDir 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?FileSourceHow to fetch bytes. Default "auto"files/index.d.ts:235
options.tokenstring-files/index.d.ts:229