From a72c70c26027a4197af890008df9ba98c963e7dc Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 25 Apr 2022 14:08:58 +0300 Subject: [PATCH] cmd option stuff --- src/structure/interfaces/CommandOption.js | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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}`; }