mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 05:13:17 +00:00
Fix commands.js
This commit is contained in:
parent
f0887514af
commit
294aa28849
@ -15,8 +15,16 @@ module.exports = {
|
|||||||
command.data = new SlashCommandBuilder()
|
command.data = new SlashCommandBuilder()
|
||||||
.setName(command.name)
|
.setName(command.name)
|
||||||
.setDescription(command.description);
|
.setDescription(command.description);
|
||||||
if(command.options) command.data.options = command.options;
|
|
||||||
commands.push(command.data.toJSON());
|
command.data = command.data.toJSON();
|
||||||
|
if(command.options) {
|
||||||
|
command.options.forEach(function(option) {
|
||||||
|
if(option.type == "STRING") option.type = 3;
|
||||||
|
command.data.options.push(option);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
commands.push(command.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rest = new REST({ version: '9' }).setToken(token);
|
const rest = new REST({ version: '9' }).setToken(token);
|
||||||
|
Loading…
Reference in New Issue
Block a user