From d9558f9d726a18a89b7b14c238d4ce3236362494 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 29 Apr 2022 20:08:46 +0300 Subject: [PATCH] utilise channel type filtering for channel options --- src/structure/interfaces/CommandOption.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/structure/interfaces/CommandOption.js b/src/structure/interfaces/CommandOption.js index 32db73f..841ef14 100644 --- a/src/structure/interfaces/CommandOption.js +++ b/src/structure/interfaces/CommandOption.js @@ -25,6 +25,10 @@ const Constants = { MENTIONABLE: 9, NUMBER: 10, FLOAT: 10 + }, + ChannelTypes: { + TEXT_CHANNEL: 0, + VOICE_CHANNEL: 3 } }; @@ -128,7 +132,8 @@ class CommandOption { choices: this.choices, options: this.options.map((o) => o.shape), min_value: this.minimum, - max_value: this.maximum + max_value: this.maximum, + channel_types: Constants.ChannelTypes[this.type] !== undefined ? [Constants.ChannelTypes[this.type]] : null }; }