ensure we're not mutating the command's actual options
This commit is contained in:
parent
9e210768fa
commit
f4d3ff9b38
1 changed files with 5 additions and 3 deletions
|
@ -188,9 +188,11 @@ bot.once("ready", async () => {
|
||||||
|
|
||||||
const commands = [];
|
const commands = [];
|
||||||
for (const command of interactionCommands.values()) {
|
for (const command of interactionCommands.values()) {
|
||||||
const options = Object.values(command.options);
|
const options = [];
|
||||||
for (const option of options) {
|
for (const option of command.options) {
|
||||||
delete option.default;
|
const newOption = Object.assign({}, option);
|
||||||
|
delete newOption.default;
|
||||||
|
options.push(newOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
// stupid hack
|
// stupid hack
|
||||||
|
|
Loading…
Reference in a new issue