diff --git a/src/managers/ApplicationCommandManager.js b/src/managers/ApplicationCommandManager.js index 58f6298..03b88cb 100644 --- a/src/managers/ApplicationCommandManager.js +++ b/src/managers/ApplicationCommandManager.js @@ -235,9 +235,10 @@ class ApplicationCommandManager extends CachedManager { } if ('defaultMemberPermissions' in command) { - default_member_permissions = command.defaultMemberPermissions - ? new Permissions(command.defaultMemberPermissions).bitfield.toString() - : command.defaultMemberPermissions; + default_member_permissions = + command.defaultMemberPermissions !== null + ? new Permissions(command.defaultMemberPermissions).bitfield.toString() + : command.defaultMemberPermissions; } return { name: command.name, diff --git a/src/structures/ApplicationCommand.js b/src/structures/ApplicationCommand.js index f496a4c..f147df6 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -389,9 +389,8 @@ class ApplicationCommand extends Base { } if ('defaultMemberPermissions' in command) { - defaultMemberPermissions = command.defaultMemberPermissions - ? new Permissions(command.defaultMemberPermissions).bitfield - : null; + defaultMemberPermissions = + command.defaultMemberPermissions !== null ? new Permissions(command.defaultMemberPermissions).bitfield : null; } // Check top level parameters const commandType = typeof command.type === 'string' ? command.type : ApplicationCommandTypes[command.type];