Skip to content

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

PropertyTypeDescriptionDefined in
apiobjectOptions to configure how to send requests to the Telegram Bot APIgramio/index.d.ts:570
api.baseURLstringURL which will be used to send requests to. Default "https://api.telegram.org/bot"gramio/index.d.ts:574
api.fetchOptions?RequestInitConfigure fetch parametersgramio/index.d.ts:572
api.retryGetUpdatesWait?numberTime in milliseconds before calling getUpdates again Default 1000gramio/index.d.ts:587
api.useTest?booleanShould 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 falsegramio/index.d.ts:582
info?TelegramUserWhen 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?objectList of plugins enabled by defaultgramio/index.d.ts:565
plugins.format?booleanPass false to disable plugin. Default truegramio/index.d.ts:567
tokenstringBot tokengramio/index.d.ts:554