cmd option stuff

This commit is contained in:
Erik 2022-04-25 14:08:58 +03:00
parent 423337a7f0
commit a72c70c260
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -88,6 +88,30 @@ class CommandOption {
}; };
} }
/**
*
* @param {*} value The initial value that is later resolved into the final value, i.e. the ID that is converted into a user, member, role etc
* @return {CommandOption}
* @memberof CommandOption
*/
clone(value) {
return new CommandOption({
name: this.name, type: this.type,
minimum: this.minimum, maximum: this.maximum,
dependsOn: this.dependsOn, dependsOnMode: this.dependsOnMode,
_rawValue: value
});
}
get raw() {
return {
name: this.name,
type: this.type,
options: []
};
}
get resolveable() { get resolveable() {
return `option:${this.name}`; return `option:${this.name}`;
} }