Compare commits

...

2 Commits

Author SHA1 Message Date
cdab7930cd
bugfix 2023-02-12 16:20:28 +02:00
6005e0735f
v1.1.0 2023-02-12 16:20:08 +02:00
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "commandparser", "name": "commandparser",
"version": "1.0.25", "version": "1.1.0",
"description": "Parser meant to parse commands and their options for discord bots", "description": "Parser meant to parse commands and their options for discord bots",
"main": "build/index.js", "main": "build/index.js",
"author": "Navy.gif", "author": "Navy.gif",
@ -17,6 +17,7 @@
"build" "build"
], ],
"scripts": { "scripts": {
"build": "tsc",
"release": "tsc && yarn publish" "release": "tsc && yarn publish"
} }
} }

View File

@ -57,7 +57,7 @@ class CommandOption implements ICommandOption {
this.choices = def.choices || []; this.choices = def.choices || [];
this.strict = def.strict || false; this.strict = def.strict || false;
this.type = def.type || OptionType.STRING; this.type = def.type ?? OptionType.STRING;
this.flag = def.flag || false; this.flag = def.flag || false;
this.valueOptional = def.valueOptional || false; this.valueOptional = def.valueOptional || false;