Skip to main content
Module

x/grammy_files/plugin.ts>hydrateFiles

Handle and download received media files.
Latest
function hydrateFiles
import { hydrateFiles } from "https://deno.land/x/grammy_files@v1.1.0/plugin.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