mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-17 03:38:17 +00:00
fix: use correct bitwise operator (#302)
* Fix permissions (sorry my ide changed & to &&) * Change botHasChannelPermissions to async. This seems to have fixed my issue for my bot * Remove async for botHasChannelPermissions * Add async back for botHasChannelPermissions since it doesn't work without it * Remove async, the issues were something else apparently
This commit is contained in:
@@ -38,8 +38,8 @@ export function channelOverwriteHasPermission(
|
||||
if (overwrite) {
|
||||
const allowBits = overwrite.allow;
|
||||
const denyBits = overwrite.deny;
|
||||
if (BigInt(denyBits) && BigInt(Permissions[perm])) return false;
|
||||
if (BigInt(allowBits) && BigInt(Permissions[perm])) return true;
|
||||
if (BigInt(denyBits) & BigInt(Permissions[perm])) return false;
|
||||
if (BigInt(allowBits) & BigInt(Permissions[perm])) return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user