Archived
added parameter type choice error
This commit is contained in:
1 parent
a8efeae9cc
commit
2537261e80
2 files changed
+7
-1
No files matched your search
@@ -64,6 +64,12 @@ export class CommandManager {
|
||||
ar.splice(i, 1);
|
||||
}
|
||||
});
|
||||
command.parameters &&
|
||||
command.parameters.map((p) => {
|
||||
if (p.type != "string" && p.choices) {
|
||||
throw new Error('Parameter with defined choices must have a "string" type');
|
||||
}
|
||||
});
|
||||
this.list.push(command);
|
||||
return true;
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user