Skip to main content

Enumeration: PatternCommandEvents

@sapphire/plugin-pattern-commands.PatternCommandEvents

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

Enumeration Members

CommandAccepted

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:22


CommandDenied

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:28


CommandError

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:50


CommandFinished

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:57


CommandNoLuck

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:12


CommandRun

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:35


CommandSuccess

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:43


PreCommandRun

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

Defined in

projects/plugins/packages/pattern-commands/src/lib/utils/PatternCommandEvents.ts:17