do not create interaction commands with options.default

This commit is contained in:
Cynthia Foxwell 2024-05-17 14:41:58 -06:00
parent 4f8340cba7
commit d55a28149a
1 changed files with 6 additions and 1 deletions

View File

@ -191,11 +191,16 @@ bot.once("ready", async () => {
const hasCommand = commands.find((c) => c.name == command.name);
if (hasCommand) continue;
const options = Object.values(command.options);
for (const option of options) {
delete option.default;
}
await bot.createCommand({
name: command.name,
type: command.type,
description: command.helpText,
options: Object.values(command.options),
options: options,
defaultMemberPermissions: command.permissions,
dmPermission: !command.guildOnly,
});