From 2e1ad203615d9e584fea8f6640669988aeb66f4f Mon Sep 17 00:00:00 2001 From: ayntee Date: Sun, 27 Dec 2020 18:53:52 +0400 Subject: [PATCH 1/2] style: format files --- src/bot.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 85f5b4992..366cf0272 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -66,8 +66,8 @@ export async function startBot(config: BotConfig) { export function updateEventHandlers(newEventHandlers: EventHandlers) { eventHandlers = { ...eventHandlers, - ...newEventHandlers - } + ...newEventHandlers, + }; } /** INTERNAL LIB function used to set the bot ID once the READY event is sent by Discord. */ From abee2e2dee46e09ec3d0f1afadc546a225e62d7c Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Sun, 27 Dec 2020 15:46:11 +0000 Subject: [PATCH 2/2] fix: hasChannelPermissions() to use memberIDHasPermission() (#279) --- src/util/permissions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/permissions.ts b/src/util/permissions.ts index 2dd777025..5417e8393 100644 --- a/src/util/permissions.ts +++ b/src/util/permissions.ts @@ -191,7 +191,7 @@ export async function hasChannelPermissions( if (permissions.every((perm) => allowedPermissions.has(perm))) return true; // Some permission was not explicitly allowed so we default to checking role perms directly - const hasPerms = await botHasPermission(guild.id, permissions); + const hasPerms = await memberIDHasPermission(memberID, guild.id, permissions); return hasPerms; }