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 = [];
|
||||
for (const command of interactionCommands.values()) {
|
||||
const options = Object.values(command.options);
|
||||
for (const option of options) {
|
||||
delete option.default;
|
||||
const options = [];
|
||||
for (const option of command.options) {
|
||||
const newOption = Object.assign({}, option);
|
||||
delete newOption.default;
|
||||
options.push(newOption);
|
||||
}
|
||||
|
||||
// stupid hack
|
||||
|
|
Loading…
Reference in a new issue