This commit is contained in:
Erik 2022-08-29 11:23:23 +03:00
parent 339b1bf610
commit 09683bb30a
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -170,7 +170,7 @@ class CommandOption {
}
async parse() {
if(!this._rawValue && !this.valueOptional) throw new Error(`Null _rawValue`);
if((this._rawValue === null || this._rawValue === undefined) && !this.valueOptional) throw new Error(`Null _rawValue passed to ${this.name}`);
// console.log('-------PARSE BEGIN---------');
// console.log('1', this.name, this._rawValue, this.valueOptional);
const { removed, value, error } = await this.types[this.type]();