Options
All
  • Public
  • Public/Protected
  • All
Menu

Module CommandErrorHandlerModule

Handles failures caused by a command's execution.

This is useful for example for sending a user-friendly message to the chat to let know the user that their command could not be executed, or sending the details of the failure to the user that manages the bot.

since

2.0.0

Hierarchy

  • Module
    • CommandErrorHandlerModule

Implemented by

Index

Variables

Const SYMBOL

SYMBOL: symbol = BotyoSymbol.forName("CommandErrorHandlerModule")

Methods

getRuntime

handle

  • This method gets executed when a command invoked by a participant fails.

    abstract
    since

    2.0.0

    Parameters

    • err: Error

      the error

    • message: Message

      the message the user sent that caused the error

    • commandModule: CommandModule

      the command module whose execution failed

    Returns Promise<any>

onListen

  • onListen(): Promise<any>

onShutdown

  • onShutdown(): Promise<any>

Generated using TypeDoc