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/PaternCommandEvents.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/PaternCommandEvents.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 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/PaternCommandEvents.ts:51


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/PaternCommandEvents.ts:58


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/PaternCommandEvents.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/PaternCommandEvents.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/PaternCommandEvents.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/PaternCommandEvents.ts:17