Module

x/grammy/bot.ts>BotConfig

The Telegram Bot Framework.
Very Popular
Go to Latest
interface BotConfig
import { type BotConfig } from "https://dotland.deno.dev/x/grammy@v1.15.0/bot.ts";

Options to pass to the bot when creating it.

Properties

optional
client: ApiClientOptions

You can specify a number of advanced options under the client property. The options will be passed to the grammY client—this is the part of grammY that actually connects to the Telegram Bot API server in the end when making HTTP requests.

optional
botInfo: UserFromGetMe

grammY automatically calls getMe when starting up to make sure that your bot has access to the bot's own information. If you restart your bot often, for example because it is running in a serverless environment, then you may want to skip this initial API call.

Set this property of the options to pre-initialize the bot with cached values. If you use this option, grammY will not attempt to make a getMe call but use the provided data instead.

optional
ContextConstructor: new (...args: ConstructorParameters<Context>) => C

Pass the constructor of a custom context object that will be used when creating the context for each incoming update.