mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
Merge branch 'master' of https://github.com/Skillz4Killz/Discordeno into next
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user