mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 21:43:33 +01:00
fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions (#8311)
* fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions * fix(ApplicationCommand): equals()
This commit is contained in:
@@ -242,7 +242,8 @@ class ApplicationCommandManager extends CachedManager {
|
||||
}
|
||||
|
||||
if ('defaultMemberPermissions' in command) {
|
||||
default_member_permissions = command.defaultMemberPermissions
|
||||
default_member_permissions =
|
||||
command.defaultMemberPermissions !== null
|
||||
? new PermissionsBitField(command.defaultMemberPermissions).bitfield.toString()
|
||||
: command.defaultMemberPermissions;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,8 @@ class ApplicationCommand extends Base {
|
||||
}
|
||||
|
||||
if ('defaultMemberPermissions' in command) {
|
||||
defaultMemberPermissions = command.defaultMemberPermissions
|
||||
defaultMemberPermissions =
|
||||
command.defaultMemberPermissions !== null
|
||||
? new PermissionsBitField(command.defaultMemberPermissions).bitfield
|
||||
: null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user