@sapphire/plugin-pattern-commands
Version:
Plugin for @sapphire/framework that adds support for pattern commands.
1 lines • 3.3 kB
Source Map (JSON)
{"version":3,"sources":["../../../../src/lib/utils/PatternCommandEvents.ts"],"names":["PatternCommandEvents"],"mappings":";;;AAIY,IAAA,oBAAA,qBAAAA,qBAAL,KAAA;AAON,EAAAA,sBAAA,eAAgB,CAAA,GAAA,sBAAA;AAKhB,EAAAA,sBAAA,eAAgB,CAAA,GAAA,sBAAA;AAKhB,EAAAA,sBAAA,iBAAkB,CAAA,GAAA,wBAAA;AAMlB,EAAAA,sBAAA,eAAgB,CAAA,GAAA,sBAAA;AAOhB,EAAAA,sBAAA,YAAa,CAAA,GAAA,mBAAA;AAQb,EAAAA,sBAAA,gBAAiB,CAAA,GAAA,uBAAA;AAOjB,EAAAA,sBAAA,cAAe,CAAA,GAAA,qBAAA;AAOf,EAAAA,sBAAA,iBAAkB,CAAA,GAAA,wBAAA;AApDP,EAAAA,OAAAA,qBAAAA;AAAA,CAAA,EAAA,oBAAA,IAAA,EAAA","file":"PatternCommandEvents.cjs","sourcesContent":["/**\n * Events emitted during the parsing and command run.\n * You can use these events for debugging and logging purposes.\n */\nexport enum PatternCommandEvents {\n\t/**\n\t * Event that is emitted when the RNG doesn't love the command\n\t * @param message The message where the command was triggered\n\t * @param command The command's piece\n\t * @param alias The alias that triggered the command\n\t */\n\tCommandNoLuck = 'patternCommandNoLuck',\n\t/**\n\t * Event that is emitted when an alias triggered the command but before parsing the preconditions\n\t * @param payload PatternCommandRunPayload which contains message, command and alias\n\t */\n\tPreCommandRun = 'patternCommandPreRun',\n\t/**\n\t * Event that is emitted after the preconditions if none of them denied the command\n\t * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias\n\t */\n\tCommandAccepted = 'patternCommandAccepted',\n\t/**\n\t * Event that is emitted after the preconditions if at least one of them denied the command\n\t * @param error The error of the precondition which denied the command\n\t * @param payload PatternCommandDeniedPayload which contains parameters, context, message, command and alias\n\t */\n\tCommandDenied = 'patternCommandDenied',\n\t/**\n\t * Event that is emitted just before the command is ran\n\t * @param message The message where the command was triggered\n\t * @param command The command's piece\n\t * @param alias The alias that triggered the command\n\t */\n\tCommandRun = 'patternCommandRun',\n\t/**\n\t * Event that is emitted if there's no error while running the command\n\t * @param result The result of command's run\n\t * @param command The command's piece\n\t * @param alias The alias that triggered the command\n\t * @param duration The duration which indicates how long it took the command to run\n\t */\n\tCommandSuccess = 'patternCommandSuccess',\n\t/**\n\t * Event that is emitted if there's an error while running the command\n\t * @param error The error message which happened while the command was running\n\t * @param command The command's piece\n\t * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias\n\t */\n\tCommandError = 'patternCommandError',\n\t/**\n\t * Event that is emitted if the command has finished, regardless of whether an error occurred or not\n\t * @param command The command's piece\n\t * @param duration The duration which indicates how long it took the command to run\n\t * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias\n\t */\n\tCommandFinished = 'patternCommandFinished'\n}\n"]}