Class: BotPoller

bot-poller~BotPoller(botAPI, onUpdates, optsopt) → {BotPoller}

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
Name Type Attributes Default Description
pollingInterval Number <optional>
1500

Polling interval.

skippingUpdates Boolean <optional>
true

Whether to skip initial Updates.

botLogger BotLogger <optional>

Pass a custom BotLogger.

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