Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy_files/mod.ts>hydrateFiles

Handle and download received media files.
Latest
function hydrateFiles
import { hydrateFiles } from "https://deno.land/x/grammy_files@v1.1.1/mod.ts";

Plugin that hydrates results to getFile, and equips the results with methods to download files, or get their URL/path.

This plugin is an API transformer function that can be installed on bot.api.

bot.api.config.use(hydrateFiles(bot.token))

Check out the official plugin documentation on the grammY website.

Type Parameters

optional
R extends RawApi = RawApi

Parameters

token: string

bot token, use bot.token

optional
options: FilesPluginOptions

optional configuration