zumito-framework 1.6.6 → 1.7.1

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.
@@ -33,6 +33,9 @@ export class SlashCommandRefresher {
33
33
  case 'string':
34
34
  method = 'addStringOption';
35
35
  break;
36
+ case 'number':
37
+ method = 'addNumberOption';
38
+ break;
36
39
  case 'user':
37
40
  case 'member':
38
41
  method = 'addUserOption';
@@ -44,7 +47,7 @@ export class SlashCommandRefresher {
44
47
  method = 'addRoleOption';
45
48
  break;
46
49
  default:
47
- throw new Error('Invalid argument type ' + arg.type);
50
+ throw new Error(`Invalid argument type ${arg.type} in command ${command.name} for argument ${arg.name}`);
48
51
  }
49
52
  slashCommand[method]((option) => {
50
53
  option.setName(arg.name);
@@ -140,6 +140,9 @@ export class CommandManager {
140
140
  case 'string':
141
141
  method = 'addStringOption';
142
142
  break;
143
+ case 'number':
144
+ method = 'addNumberOption';
145
+ break;
143
146
  case 'user':
144
147
  case 'member':
145
148
  method = 'addUserOption';
@@ -151,7 +154,7 @@ export class CommandManager {
151
154
  method = 'addRoleOption';
152
155
  break;
153
156
  default:
154
- throw new Error('Invalid argument type ' + arg.type);
157
+ throw new Error(`Invalid argument type ${arg.type} in command ${command.name} for argument ${arg.name}`);
155
158
  }
156
159
  slashCommand[method]((option) => {
157
160
  option.setName(arg.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.6.6",
3
+ "version": "1.7.1",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",