do not create interaction commands with options.default
This commit is contained in:
parent
4f8340cba7
commit
d55a28149a
1 changed files with 6 additions and 1 deletions
|
@ -191,11 +191,16 @@ bot.once("ready", async () => {
|
||||||
const hasCommand = commands.find((c) => c.name == command.name);
|
const hasCommand = commands.find((c) => c.name == command.name);
|
||||||
if (hasCommand) continue;
|
if (hasCommand) continue;
|
||||||
|
|
||||||
|
const options = Object.values(command.options);
|
||||||
|
for (const option of options) {
|
||||||
|
delete option.default;
|
||||||
|
}
|
||||||
|
|
||||||
await bot.createCommand({
|
await bot.createCommand({
|
||||||
name: command.name,
|
name: command.name,
|
||||||
type: command.type,
|
type: command.type,
|
||||||
description: command.helpText,
|
description: command.helpText,
|
||||||
options: Object.values(command.options),
|
options: options,
|
||||||
defaultMemberPermissions: command.permissions,
|
defaultMemberPermissions: command.permissions,
|
||||||
dmPermission: !command.guildOnly,
|
dmPermission: !command.guildOnly,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue