This commit is contained in:
Skillz
2020-11-18 10:11:40 -05:00
2 changed files with 8 additions and 0 deletions

View File

@@ -55,6 +55,9 @@ export async function botHasPermission(
const guild = await cacheHandlers.get("guilds", guildID);
if (!guild) return false;
// Check if the bot is the owner of the guild, if it is, returns true
if (guild.ownerID === botID) return true;
const member = guild.members.get(botID);
if (!member) return false;

View File

@@ -68,6 +68,9 @@ Deno.test({
assert(createdGuild);
data.guildID = createdGuild.id;
// Delay the execution by 5 seconds to allow the guild create event to be received
await delay(5000);
},
...testOptions,
});
@@ -82,6 +85,8 @@ Deno.test({
name: "Role 1",
});
console.log(createdRole);
// Check whether the created role is nil or not
assert(createdRole);