@sapphire/plugin-pattern-commands 2.0.0 → 2.0.1-next.3fe7e48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,59 @@
1
+ /**
2
+ * Events emitted during the parsing and command run.
3
+ * You can use these events for debugging and logging purposes.
4
+ */
1
5
  export declare enum PatternCommandEvents {
6
+ /**
7
+ * Event that is emitted when the RNG doesn't love the command
8
+ * @param message The message where the command was triggered
9
+ * @param command The command's piece
10
+ * @param alias The alias that triggered the command
11
+ */
2
12
  CommandNoLuck = "patternCommandNoLuck",
13
+ /**
14
+ * Event that is emitted when an alias triggered the command but before parsing the preconditions
15
+ * @param payload PatternCommandRunPayload which contains message, command and alias
16
+ */
3
17
  PreCommandRun = "patternCommandPreRun",
18
+ /**
19
+ * Event that is emitted after the preconditions if none of them denied the command
20
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
21
+ */
4
22
  CommandAccepted = "patternCommandAccepted",
23
+ /**
24
+ * Event that is emitted after the preconditions if at least one of them denied the command
25
+ * @param error The error of the precondition which denied the command
26
+ * @param payload PatternCommandDeniedPayload which contains parameters, context, message, command and alias
27
+ */
5
28
  CommandDenied = "patternCommandDenied",
29
+ /**
30
+ * Event that is emitted just before the command is ran
31
+ * @param message The message where the command was triggered
32
+ * @param command The command's piece
33
+ * @param alias The alias that triggered the command
34
+ */
6
35
  CommandRun = "patternCommandRun",
36
+ /**
37
+ * Event that is emitted if there's no error while running the command
38
+ * @param result The result of command's run
39
+ * @param command The command's piece
40
+ * @param alias The alias that triggered the command
41
+ */
7
42
  CommandSuccess = "patternCommandSuccess",
43
+ /**
44
+ * Event that is emitted if there's an error while running the command
45
+ * @param error The error message which happened while the command was running
46
+ * @param command The command's piece
47
+ * @param duration The duration which indicates how long it took the command to run
48
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
49
+ */
8
50
  CommandError = "patternCommandError",
51
+ /**
52
+ * Event that is emitted if the command has finished, regardless of whether an error occurred or not
53
+ * @param command The command's piece
54
+ * @param duration The duration which indicates how long it took the command to run
55
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
56
+ */
9
57
  CommandFinished = "patternCommandFinished"
10
58
  }
11
59
  //# sourceMappingURL=PaternCommandEvents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaternCommandEvents.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/PaternCommandEvents.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC/B,aAAa,yBAAyB;IACtC,aAAa,yBAAyB;IACtC,eAAe,2BAA2B;IAC1C,aAAa,yBAAyB;IACtC,UAAU,sBAAsB;IAChC,cAAc,0BAA0B;IACxC,YAAY,wBAAwB;IACpC,eAAe,2BAA2B;CAC1C"}
1
+ {"version":3,"file":"PaternCommandEvents.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/PaternCommandEvents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,oBAAoB;IAC/B;;;;;OAKG;IACH,aAAa,yBAAyB;IACtC;;;OAGG;IACH,aAAa,yBAAyB;IACtC;;;OAGG;IACH,eAAe,2BAA2B;IAC1C;;;;OAIG;IACH,aAAa,yBAAyB;IACtC;;;;;OAKG;IACH,UAAU,sBAAsB;IAChC;;;;;OAKG;IACH,cAAc,0BAA0B;IACxC;;;;;;OAMG;IACH,YAAY,wBAAwB;IACpC;;;;;OAKG;IACH,eAAe,2BAA2B;CAC1C"}
@@ -1,15 +1,63 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PatternCommandEvents = void 0;
4
+ /**
5
+ * Events emitted during the parsing and command run.
6
+ * You can use these events for debugging and logging purposes.
7
+ */
4
8
  var PatternCommandEvents;
5
9
  (function (PatternCommandEvents) {
10
+ /**
11
+ * Event that is emitted when the RNG doesn't love the command
12
+ * @param message The message where the command was triggered
13
+ * @param command The command's piece
14
+ * @param alias The alias that triggered the command
15
+ */
6
16
  PatternCommandEvents["CommandNoLuck"] = "patternCommandNoLuck";
17
+ /**
18
+ * Event that is emitted when an alias triggered the command but before parsing the preconditions
19
+ * @param payload PatternCommandRunPayload which contains message, command and alias
20
+ */
7
21
  PatternCommandEvents["PreCommandRun"] = "patternCommandPreRun";
22
+ /**
23
+ * Event that is emitted after the preconditions if none of them denied the command
24
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
25
+ */
8
26
  PatternCommandEvents["CommandAccepted"] = "patternCommandAccepted";
27
+ /**
28
+ * Event that is emitted after the preconditions if at least one of them denied the command
29
+ * @param error The error of the precondition which denied the command
30
+ * @param payload PatternCommandDeniedPayload which contains parameters, context, message, command and alias
31
+ */
9
32
  PatternCommandEvents["CommandDenied"] = "patternCommandDenied";
33
+ /**
34
+ * Event that is emitted just before the command is ran
35
+ * @param message The message where the command was triggered
36
+ * @param command The command's piece
37
+ * @param alias The alias that triggered the command
38
+ */
10
39
  PatternCommandEvents["CommandRun"] = "patternCommandRun";
40
+ /**
41
+ * Event that is emitted if there's no error while running the command
42
+ * @param result The result of command's run
43
+ * @param command The command's piece
44
+ * @param alias The alias that triggered the command
45
+ */
11
46
  PatternCommandEvents["CommandSuccess"] = "patternCommandSuccess";
47
+ /**
48
+ * Event that is emitted if there's an error while running the command
49
+ * @param error The error message which happened while the command was running
50
+ * @param command The command's piece
51
+ * @param duration The duration which indicates how long it took the command to run
52
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
53
+ */
12
54
  PatternCommandEvents["CommandError"] = "patternCommandError";
55
+ /**
56
+ * Event that is emitted if the command has finished, regardless of whether an error occurred or not
57
+ * @param command The command's piece
58
+ * @param duration The duration which indicates how long it took the command to run
59
+ * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
60
+ */
13
61
  PatternCommandEvents["CommandFinished"] = "patternCommandFinished";
14
62
  })(PatternCommandEvents = exports.PatternCommandEvents || (exports.PatternCommandEvents = {}));
15
63
  //# sourceMappingURL=PaternCommandEvents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaternCommandEvents.js","sourceRoot":"","sources":["../../../src/lib/utils/PaternCommandEvents.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,8DAAsC,CAAA;IACtC,8DAAsC,CAAA;IACtC,kEAA0C,CAAA;IAC1C,8DAAsC,CAAA;IACtC,wDAAgC,CAAA;IAChC,gEAAwC,CAAA;IACxC,4DAAoC,CAAA;IACpC,kEAA0C,CAAA;AAC3C,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B"}
1
+ {"version":3,"file":"PaternCommandEvents.js","sourceRoot":"","sources":["../../../src/lib/utils/PaternCommandEvents.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,oBAqDX;AArDD,WAAY,oBAAoB;IAC/B;;;;;OAKG;IACH,8DAAsC,CAAA;IACtC;;;OAGG;IACH,8DAAsC,CAAA;IACtC;;;OAGG;IACH,kEAA0C,CAAA;IAC1C;;;;OAIG;IACH,8DAAsC,CAAA;IACtC;;;;;OAKG;IACH,wDAAgC,CAAA;IAChC;;;;;OAKG;IACH,gEAAwC,CAAA;IACxC;;;;;;OAMG;IACH,4DAAoC,CAAA;IACpC;;;;;OAKG;IACH,kEAA0C,CAAA;AAC3C,CAAC,EArDW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAqD/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/plugin-pattern-commands",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-next.3fe7e48.0",
4
4
  "description": "Plugin for @sapphire/framework that adds support for pattern commands.",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "afb9f72a22b99540af0b78c3e909886d1d6b74e9"
68
+ "gitHead": "3fe7e48a3577df6d9addc613cae74ccb07e41639"
69
69
  }