Skip to main content
Latest
interface RunnerOptions
import { type RunnerOptions } from "https://deno.land/x/grammy_runner@v2.0.3/runner.ts";

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

Properties

optional
fetch: FetchOptions

Options that can be passed when fetching new updates. All options here are simply forwarded to getUpdates. The runner itself does not do anything with them.

optional
maxRetryTime: number

When a call to getUpdates fails, this option specifies the number of milliseconds that the runner should keep on retrying the calls.

optional
retryInterval: "exponential" | "quadratic" | number

Time to wait between retries of calls to getUpdates. Can be a number of milliseconds to wait. Can be 'exponential' or 'quadratic' for increasing backoff starting at 100 milliseconds.

optional
silent: boolean

The runner logs all errors from getUpdates calls via console.error. Set this option to false to suppress output.