mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fixing tests and perm check bug
This commit is contained in:
@@ -33,8 +33,8 @@ export function channelOverwriteHasPermission(
|
|||||||
if (overwrite) {
|
if (overwrite) {
|
||||||
const allowBits = overwrite.allow;
|
const allowBits = overwrite.allow;
|
||||||
const denyBits = overwrite.deny;
|
const denyBits = overwrite.deny;
|
||||||
if (BigInt(denyBits) & BigInt(perm)) return false;
|
if (BigInt(denyBits) & BigInt(Permissions[perm])) return false;
|
||||||
if (BigInt(allowBits) & BigInt(perm)) return true;
|
if (BigInt(allowBits) & BigInt(Permissions[perm])) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-4
@@ -40,8 +40,8 @@ const testOptions = {
|
|||||||
Deno.test({
|
Deno.test({
|
||||||
name: "connect to the gateway",
|
name: "connect to the gateway",
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
// Delay the execution by 15 seconds (15000 ms)
|
// Delay the execution by 10 seconds (15000 ms)
|
||||||
await delay(15000);
|
await delay(10000);
|
||||||
|
|
||||||
// Check whether botID is nil or not
|
// Check whether botID is nil or not
|
||||||
assert(botID);
|
assert(botID);
|
||||||
@@ -84,8 +84,6 @@ Deno.test({
|
|||||||
name: "Role 1",
|
name: "Role 1",
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(createdRole);
|
|
||||||
|
|
||||||
// Check whether the created role is nil or not
|
// Check whether the created role is nil or not
|
||||||
assert(createdRole);
|
assert(createdRole);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user