From bee76dbf9ecbdba8d01ab2a16ab23fcb838586a7 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Thu, 22 Dec 2022 12:03:50 +0700 Subject: [PATCH] fix: addBot #452 --- src/structures/Guild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 1ca23b4..bab9c96 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1517,7 +1517,7 @@ class Guild extends AnonymousGuild { if (!botId) throw new TypeError('INVALID_BOT_ID'); // Check permission const selfPerm = this.me.permissions.toArray(); - const missingPerms = permission.toArray().filter(x => selfPerm.includes(x)); + const missingPerms = permission.toArray().filter(x => !selfPerm.includes(x)); if (missingPerms.length) { throw new Error('MISSING_PERMISSIONS', missingPerms.join(', ')); }