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:
TriForMine
2020-12-30 14:35:39 +01:00
committed by GitHub
parent 484f86638f
commit d53725d069
2 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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;
});