diff --git a/src/structure/interfaces/CommandOption.js b/src/structure/interfaces/CommandOption.js index ed7b3c0..8d8146d 100644 --- a/src/structure/interfaces/CommandOption.js +++ b/src/structure/interfaces/CommandOption.js @@ -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() { return `option:${this.name}`; }