mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Merge pull request #200 from Skillz4Killz/perm
feat(utils): check if bot is the owner of the guild
This commit is contained in:
@@ -55,6 +55,9 @@ export async function botHasPermission(
|
|||||||
const guild = await cacheHandlers.get("guilds", guildID);
|
const guild = await cacheHandlers.get("guilds", guildID);
|
||||||
if (!guild) return false;
|
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);
|
const member = guild.members.get(botID);
|
||||||
if (!member) return false;
|
if (!member) return false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user