forked from Galactic/galactic-bot
utilise channel type filtering for channel options
This commit is contained in:
parent
bbfb75498f
commit
d9558f9d72
@ -25,6 +25,10 @@ const Constants = {
|
|||||||
MENTIONABLE: 9,
|
MENTIONABLE: 9,
|
||||||
NUMBER: 10,
|
NUMBER: 10,
|
||||||
FLOAT: 10
|
FLOAT: 10
|
||||||
|
},
|
||||||
|
ChannelTypes: {
|
||||||
|
TEXT_CHANNEL: 0,
|
||||||
|
VOICE_CHANNEL: 3
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -128,7 +132,8 @@ class CommandOption {
|
|||||||
choices: this.choices,
|
choices: this.choices,
|
||||||
options: this.options.map((o) => o.shape),
|
options: this.options.map((o) => o.shape),
|
||||||
min_value: this.minimum,
|
min_value: this.minimum,
|
||||||
max_value: this.maximum
|
max_value: this.maximum,
|
||||||
|
channel_types: Constants.ChannelTypes[this.type] !== undefined ? [Constants.ChannelTypes[this.type]] : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user