Enumeration: PatternCommandEvents
Events emitted during the parsing and command run. You can use these events for debugging and logging purposes.
Enumeration Members
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
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 | lib/utils/PatternCommandEvents.ts:22 |
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 | lib/utils/PatternCommandEvents.ts:28 |
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 | lib/utils/PatternCommandEvents.ts:50 |
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 | lib/utils/PatternCommandEvents.ts:57 |
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 | lib/utils/PatternCommandEvents.ts:12 |
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 | lib/utils/PatternCommandEvents.ts:35 |
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 | lib/utils/PatternCommandEvents.ts:43 |
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 | lib/utils/PatternCommandEvents.ts:17 |