BotConfig
Options to pass to the bot when creating it.
Properties
client
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
botInfo?: UserFromGetMe;
grammY automatically calls get
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 get
call but use the provided data instead.
ContextConstructor
ContextConstructor?: new (...args: ConstructorParameters<typeof Context>) => C;
Pass the constructor of a custom context object that will be used when creating the context for each incoming update.