Skip to main content
Latest
import * as grammyRunner from "https://deno.land/x/grammy_runner@v2.0.3/runner.ts";

Functions

Creates a runner that pulls in updates from the supplied source, and passes them to the supplied sink. Returns a handle that lets you control the runner, e.g. start it.

Takes a grammY bot and returns an update fetcher function for it. The returned function has built-in retrying behavior that can be configured. After every successful fetching operation, the offset parameter is correctly incremented. As a result, you can simply invoke the created function multiple times in a row, and you will obtain new updates every time.

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.

Interfaces

Options that can be passed to the call to getUpdates when the runner fetches new a new batch of updates.

This handle gives you control over a runner. It allows you to stop the bot, start it again, and check whether it is running.

Options to be passed to the runner created internally by run(bot).

Options to be passed to run(bot, options). Collects the options for the underlying update source, runner, and update sink.