new BotPoller(botAPI, onUpdates, optsopt) → {BotPoller}
A Poller that automatically run getUpdates()
and call onUpdates()
.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
botAPI |
BotAPI | ||||||||||||||||||||||
onUpdates |
function | A callback Function to process Updates. |
|||||||||||||||||||||
opts |
Object |
<optional> |
Optional arguments. Properties
|
- Source:
Returns:
- Type
- BotPoller
Example
new BotPoller(botAPI, onUpdates, opts)
Methods
(async) startPollUpdates() → {Boolean}
- Source:
Returns:
Polling or not.
- Type
- Boolean
stopPollUpdates() → {Boolean}
- Source:
Returns:
Polling or not.
- Type
- Boolean