Skip to main content
Module

x/grammy_runner/mod.ts>run

Scale grammY bots
Latest
function run
import { run } from "https://deno.land/x/grammy_runner@v2.0.3/mod.ts";

Runs a grammY bot with long polling. Updates are processed concurrently with a default maximum concurrency of 500 updates. Calls to getUpdates will be slowed down and the limit parameter will be adjusted as soon as this load limit is reached.

You should use this method if your bot processes a lot of updates (several thousand per hour), or if your bot has long-running operations such as large file transfers.

Confer the grammY documentation to learn more about how to scale a bot with grammY.

Type Parameters

Y extends { update_id: number; }
R

Parameters

bot: BotAdapter<Y, R>

A grammY bot

optional
options: RunOptions<Y> = [UNSUPPORTED]

Further configuration options

Returns

A handle to manage your running bot