ensure we're not mutating the command's actual options

This commit is contained in:
Cynthia Foxwell 2024-05-17 15:27:57 -06:00
parent 9e210768fa
commit f4d3ff9b38

View file

@ -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