Bot

Bot

The Bot class responds to incoming events from Callback API, and figures out what needs to be done.

Constructor

new Bot(core, groupId, confirmationToken, secret, port) → {Bot}

Source:
Parameters:
Name Type Description
core Core

a Core object

groupId string | number

group ID from Callback API settings

confirmationToken string

confirmation token from Callback API settings

secret string

secret key (can be set in Callback API settings)

port number

the port bot will run at

Returns:
Type:
Bot

Members

(private, static) this._confirmationToken :string

Confirmation token

Source:
Type:
  • string

(private, static) this._core :Core

Core

Source:
Type:

(private, static) this._groupId :string|number

Group ID

Source:
Type:
  • string | number

(private, static) this._port :number

Port

Source:
Type:
  • number

(private, static) this._secret :string

Secret

Source:
Type:
  • string

Methods

start()

Starts the bot

Source: