Skip to main content


The Telegram Bot Framework.
Extremely Popular
Go to Latest
interface BotConfig
import { type BotConfig } from "";

Options to pass to the bot when creating it.


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.

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.

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.