@sapphire/plugin-pattern-commands 2.1.0-next.6ab6493.0 → 2.1.1-next.743c9a6.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.
@@ -38,13 +38,13 @@ export declare enum PatternCommandEvents {
38
38
  * @param result The result of command's run
39
39
  * @param command The command's piece
40
40
  * @param alias The alias that triggered the command
41
+ * @param duration The duration which indicates how long it took the command to run
41
42
  */
42
43
  CommandSuccess = "patternCommandSuccess",
43
44
  /**
44
45
  * Event that is emitted if there's an error while running the command
45
46
  * @param error The error message which happened while the command was running
46
47
  * @param command The command's piece
47
- * @param duration The duration which indicates how long it took the command to run
48
48
  * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
49
49
  */
50
50
  CommandError = "patternCommandError",
@@ -1 +1 @@
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
+ {"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;;;;;;OAMG;IACH,cAAc,0BAA0B;IACxC;;;;;OAKG;IACH,YAAY,wBAAwB;IACpC;;;;;OAKG;IACH,eAAe,2BAA2B;CAC1C"}
@@ -42,13 +42,13 @@ var PatternCommandEvents;
42
42
  * @param result The result of command's run
43
43
  * @param command The command's piece
44
44
  * @param alias The alias that triggered the command
45
+ * @param duration The duration which indicates how long it took the command to run
45
46
  */
46
47
  PatternCommandEvents["CommandSuccess"] = "patternCommandSuccess";
47
48
  /**
48
49
  * Event that is emitted if there's an error while running the command
49
50
  * @param error The error message which happened while the command was running
50
51
  * @param command The command's piece
51
- * @param duration The duration which indicates how long it took the command to run
52
52
  * @param payload PatternCommandAcceptedPayload which contains parameters, context, message, command and alias
53
53
  */
54
54
  PatternCommandEvents["CommandError"] = "patternCommandError";
@@ -1 +1 @@
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"}
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;;;;;;OAMG;IACH,gEAAwC,CAAA;IACxC;;;;;OAKG;IACH,4DAAoC,CAAA;IACpC;;;;;OAKG;IACH,kEAA0C,CAAA;AAC3C,CAAC,EArDW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAqD/B"}
@@ -25,13 +25,12 @@ class CommandAcceptedListener extends framework_1.Listener {
25
25
  const result = await command.messageRun(message);
26
26
  const { duration } = stopwatch.stop();
27
27
  message.client.emit(PaternCommandEvents_1.PatternCommandEvents.CommandSuccess, result, command, alias, duration);
28
- return { result, duration };
28
+ return duration;
29
29
  });
30
- const { duration } = result.value;
31
30
  if ((0, framework_1.isErr)(result)) {
32
- message.client.emit(PaternCommandEvents_1.PatternCommandEvents.CommandError, result.error, command, duration, payload);
31
+ message.client.emit(PaternCommandEvents_1.PatternCommandEvents.CommandError, result.error, command, payload);
33
32
  }
34
- message.client.emit(PaternCommandEvents_1.PatternCommandEvents.CommandFinished, command, duration, payload);
33
+ message.client.emit(PaternCommandEvents_1.PatternCommandEvents.CommandFinished, command, result.value, payload);
35
34
  }
36
35
  }
37
36
  exports.CommandAcceptedListener = CommandAcceptedListener;
@@ -1 +1 @@
1
- {"version":3,"file":"PluginCommandAccepted.js","sourceRoot":"","sources":["../../src/listeners/PluginCommandAccepted.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AAEjE,mDAAgD;AAChD,0EAAwE;AAGxE,MAAa,uBAAwB,SAAQ,oBAAqD;IACjG,YAAmB,OAAqB;QACvC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,0CAAoB,CAAC,eAAe,EAAE,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,OAAsC;QACtD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GA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,CAAC;YAClC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACjD,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;YAEtC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0CAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YAE3F,OAAO,QAAQ,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,IAAI,IAAA,iBAAK,EAAC,MAAM,CAAC,EAAE;YAClB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0CAAoB,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACvF;QAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0CAAoB,CAAC,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACD;AApCD,0DAoCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/plugin-pattern-commands",
3
- "version": "2.1.0-next.6ab6493.0",
3
+ "version": "2.1.1-next.743c9a6.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": "6ab6493918bb7979a83d8beefc169329ee0bd5dd"
68
+ "gitHead": "743c9a606cd8d03cc91666cb86953ba302ccfb65"
69
69
  }