diff --git a/src/structure/interfaces/CommandOption.js b/src/structure/interfaces/CommandOption.js index d6b8ae0..195e183 100644 --- a/src/structure/interfaces/CommandOption.js +++ b/src/structure/interfaces/CommandOption.js @@ -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]();