Skip to main content

Enumeration: PatternCommandEvents

Events emitted during the parsing and command run. You can use these events for debugging and logging purposes.

Enumeration Members

Enumeration MemberValueDescription
CommandAccepted"patternCommandAccepted"

Event that is emitted after the preconditions if none of them denied the command

Param

PatternCommandAcceptedPayload which contains parameters, context, message, command and alias

CommandDenied"patternCommandDenied"

Event that is emitted after the preconditions if at least one of them denied the command

Param

The error of the precondition which denied the command

Param

PatternCommandDeniedPayload which contains parameters, context, message, command and alias

CommandError"patternCommandError"

Event that is emitted if there's an error while running the command

Param

The error message which happened while the command was running

Param

The command's piece

Param

PatternCommandAcceptedPayload which contains parameters, context, message, command and alias

CommandFinished"patternCommandFinished"

Event that is emitted if the command has finished, regardless of whether an error occurred or not

Param

The command's piece

Param

The duration which indicates how long it took the command to run

Param

PatternCommandAcceptedPayload which contains parameters, context, message, command and alias

CommandNoLuck"patternCommandNoLuck"

Event that is emitted when the RNG doesn't love the command

Param

The message where the command was triggered

Param

The command's piece

Param

The alias that triggered the command

CommandRun"patternCommandRun"

Event that is emitted just before the command is ran

Param

The message where the command was triggered

Param

The command's piece

Param

The alias that triggered the command

CommandSuccess"patternCommandSuccess"

Event that is emitted if there's no error while running the command

Param

The result of command's run

Param

The command's piece

Param

The alias that triggered the command

Param

The duration which indicates how long it took the command to run

PreCommandRun"patternCommandPreRun"

Event that is emitted when an alias triggered the command but before parsing the preconditions

Param

PatternCommandRunPayload which contains message, command and alias