mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Nullable permission overwrites (#869)
Made it possible to pass null to GuildChannel.overwritePermissions's PermissionOverwriteOptions to blank the permission out.
This commit is contained in:
@@ -155,6 +155,9 @@ class GuildChannel extends Channel {
|
||||
} else if (options[perm] === false) {
|
||||
payload.allow &= ~(Constants.PermissionFlags[perm] || 0);
|
||||
payload.deny |= Constants.PermissionFlags[perm] || 0;
|
||||
} else if (options[perm] === null) {
|
||||
payload.allow &= ~(Constants.PermissionFlags[perm] || 0);
|
||||
payload.deny &= ~(Constants.PermissionFlags[perm] || 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user