Skip to main content
Plugins follow a specific lifecycle when added to bots.

Lifecycle stages

1

Installation

Plugin is added to bot via addPlugin()
2

Configuration

Plugin receives configuration and dependencies
3

Registration

Plugin handlers are registered
4

Active

Plugin handles events and messages

Handler execution

Plugin handlers execute before bot handlers:
  1. Plugin message handlers
  2. Bot message handlers
  3. Plugin event handlers
  4. Bot event handlers