mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions (v13) (#8312)
This commit is contained in:
@@ -231,7 +231,8 @@ class ApplicationCommandManager extends CachedManager {
|
||||
}
|
||||
|
||||
if ('defaultMemberPermissions' in command) {
|
||||
default_member_permissions = command.defaultMemberPermissions
|
||||
default_member_permissions =
|
||||
command.defaultMemberPermissions !== null
|
||||
? new Permissions(command.defaultMemberPermissions).bitfield.toString()
|
||||
: command.defaultMemberPermissions;
|
||||
}
|
||||
|
||||
@@ -382,9 +382,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
|
||||
|
||||
Reference in New Issue
Block a user