Feature:
Currently, if the constructor option 'options.polling' is
passed, the bot begins polling immediately! There's NO
way to disable this behavior, which might be useful in
cases such as:
* providing custom polling parameters without starting
the polling immediately
The boolean option, 'autoStart', can now be used to control this
behavior. For example,
```js
const bot = new TelegramBot(token, {
polling: {
autoStart: false,
},
});
```
If set to 'false', the bot does NOT begin polling
immediately. You'll have to use TelegramBot#initPolling().
If not provided, its value defaults to 'true'.
Implementation:
* Backwards-compatible: the behavior of starting polling
immediately remains, when the parameter is NOT provided
experimental
parent
daab34d98d
commit
e2f095fc52
Loading…
Reference in new issue