Skip to content

GramIO API Reference / gramio/dist / BotOptions

Interface: BotOptions

Defined in: gramio/index.d.ts:760

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:778
api.baseURLstringURL which will be used to send requests to. Default "https://api.telegram.org/bot"gramio/index.d.ts:782
api.fetchOptions?RequestInitConfigure fetch parametersgramio/index.d.ts:780
api.retryGetUpdatesWait?numberTime in milliseconds before calling getUpdates again Default 1000gramio/index.d.ts:795
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:790
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:771
plugins?objectList of plugins enabled by defaultgramio/index.d.ts:773
plugins.format?booleanPass false to disable plugin. Default truegramio/index.d.ts:775
tokenstringBot tokengramio/index.d.ts:762