Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bot

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

Hierarchy

  • Bot

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Bot(core: Core, groupId: string, confirmationToken: string, secret: string, port: number): Bot
  • Creates a new Bot.

    Parameters

    • core: Core

      a Core object

    • groupId: string

      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 Bot

Properties

Private confirmationToken

confirmationToken: string

Confirmation token.

Private core

core: Core

Core.

Private groupId

groupId: string

Group ID.

Private port

port: number

Port.

Private secret

secret: string

Secret.

Methods

start

  • start(): void
  • Starts the bot.

    Returns void

Generated using TypeDoc