necord 3.0.7 → 3.0.8

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.
@@ -59,15 +59,15 @@ let CommandsService = CommandsService_1 = class CommandsService {
59
59
  prototype,
60
60
  method });
61
61
  });
62
- commands.forEach((_a) => {
63
- var { instance, prototype, method } = _a, command = __rest(_a, ["instance", "prototype", "method"]);
62
+ for (let _a of commands) {
63
+ const { instance, prototype, method } = _a, command = __rest(_a, ["instance", "prototype", "method"]);
64
64
  const options = this.metadataAccessor.getOptionsMetadata(instance, method);
65
65
  let group = this.metadataAccessor.getCommandGroupMetadata(instance, method);
66
66
  let subGroup = this.metadataAccessor.getCommandSubGroupMetadata(instance, method);
67
67
  if (command.type !== 1 /* CHAT_INPUT */) {
68
68
  this.commands.push(command);
69
69
  this.registerContextMenuHandler(command, command.execute);
70
- return;
70
+ continue;
71
71
  }
72
72
  else if (!group && subGroup) {
73
73
  subGroup = undefined;
@@ -76,13 +76,12 @@ let CommandsService = CommandsService_1 = class CommandsService {
76
76
  this.registerSlashCommandHandler(group === null || group === void 0 ? void 0 : group.name, subGroup === null || subGroup === void 0 ? void 0 : subGroup.name, command, options, command.execute);
77
77
  if (!group && !subGroup) {
78
78
  this.commands.push(command);
79
- return;
79
+ continue;
80
80
  }
81
81
  const cachedGroup = this.commands.find(c => c.type === 1 /* CHAT_INPUT */ && c.name === group.name);
82
82
  group = cachedGroup !== null && cachedGroup !== void 0 ? cachedGroup : group;
83
83
  if (!subGroup) {
84
84
  group.options.push(command);
85
- return;
86
85
  }
87
86
  else {
88
87
  const cachedSubGroup = group.options.find(s => s.type === 2 /* SUB_COMMAND_GROUP */ && s.name === (subGroup === null || subGroup === void 0 ? void 0 : subGroup.name));
@@ -91,7 +90,7 @@ let CommandsService = CommandsService_1 = class CommandsService {
91
90
  !cachedSubGroup && group.options.push(subGroup);
92
91
  }
93
92
  !cachedGroup && this.commands.push(group);
94
- });
93
+ }
95
94
  });
96
95
  }
97
96
  onReadyRegistration() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "necord",
3
3
  "description": "A module for creating Discord bots using NestJS, based on Discord.js.",
4
- "version": "3.0.7",
4
+ "version": "3.0.8",
5
5
  "scripts": {
6
6
  "build": "rimraf -rf dist && tsc -p tsconfig.json",
7
7
  "prepublish:npm": "npm run build",
@@ -42,12 +42,12 @@
42
42
  ],
43
43
  "dependencies": {},
44
44
  "devDependencies": {
45
- "@commitlint/cli": "15.0.0",
46
- "@commitlint/config-angular": "15.0.0",
47
- "@favware/npm-deprecate": "^1.0.4",
45
+ "@commitlint/cli": "16.0.0",
46
+ "@commitlint/config-angular": "16.0.0",
47
+ "@favware/npm-deprecate": "1.0.4",
48
48
  "@nestjs/common": "8.2.4",
49
49
  "@nestjs/core": "8.2.4",
50
- "@types/node": "17.0.4",
50
+ "@types/node": "17.0.5",
51
51
  "@typescript-eslint/eslint-plugin": "4.33.0",
52
52
  "@typescript-eslint/parser": "4.33.0",
53
53
  "discord.js": "13.3.1",