fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions (v13)
#8312 v13.9.1
This commit is contained in:
parent
1e9c6ad9d5
commit
94c0ae135a
@ -235,9 +235,10 @@ class ApplicationCommandManager extends CachedManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('defaultMemberPermissions' in command) {
|
if ('defaultMemberPermissions' in command) {
|
||||||
default_member_permissions = command.defaultMemberPermissions
|
default_member_permissions =
|
||||||
? new Permissions(command.defaultMemberPermissions).bitfield.toString()
|
command.defaultMemberPermissions !== null
|
||||||
: command.defaultMemberPermissions;
|
? new Permissions(command.defaultMemberPermissions).bitfield.toString()
|
||||||
|
: command.defaultMemberPermissions;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
name: command.name,
|
name: command.name,
|
||||||
|
@ -389,9 +389,8 @@ class ApplicationCommand extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('defaultMemberPermissions' in command) {
|
if ('defaultMemberPermissions' in command) {
|
||||||
defaultMemberPermissions = command.defaultMemberPermissions
|
defaultMemberPermissions =
|
||||||
? new Permissions(command.defaultMemberPermissions).bitfield
|
command.defaultMemberPermissions !== null ? new Permissions(command.defaultMemberPermissions).bitfield : null;
|
||||||
: null;
|
|
||||||
}
|
}
|
||||||
// Check top level parameters
|
// Check top level parameters
|
||||||
const commandType = typeof command.type === 'string' ? command.type : ApplicationCommandTypes[command.type];
|
const commandType = typeof command.type === 'string' ? command.type : ApplicationCommandTypes[command.type];
|
||||||
|
Loading…
Reference in New Issue
Block a user