GramIO API Reference / gramio/dist / BotOptions
Interface: BotOptions
Defined in: gramio/index.d.ts:552
Bot options that you can provide to Bot constructor
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
api | object | Options to configure how to send requests to the Telegram Bot API | gramio/index.d.ts:570 |
api.baseURL | string | URL which will be used to send requests to. Default "https://api.telegram.org/bot" | gramio/index.d.ts:574 |
api.fetchOptions? | RequestInit | Configure fetch parameters | gramio/index.d.ts:572 |
api.retryGetUpdatesWait? | number | Time in milliseconds before calling getUpdates again Default 1000 | gramio/index.d.ts:587 |
api.useTest? | boolean | Should we send requests to test data center? The test environment is completely separate from the main environment, so you will need to create a new user account and a new bot with @BotFather. Documentation Default false | gramio/index.d.ts:582 |
info? | TelegramUser | When the bot begins to listen for updates, GramIO retrieves information about the bot to verify if the bot token is valid and to utilize some bot metadata. For example, this metadata will be used to strip bot mentions in commands. If you set it up, GramIO will not send a getMe request on startup. Important You should set this up when horizontally scaling your bot or working in serverless environments. | gramio/index.d.ts:563 |
plugins? | object | List of plugins enabled by default | gramio/index.d.ts:565 |
plugins.format? | boolean | Pass false to disable plugin. Default true | gramio/index.d.ts:567 |
token | string | Bot token | gramio/index.d.ts:554 |