From cdd64d71284033bd0f4498e92f15ab018aaae7f5 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 30 Jul 2020 22:51:48 +0300 Subject: [PATCH] utility: fix !clean permission check --- backend/src/plugins/Utility/commands/CleanCmd.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/plugins/Utility/commands/CleanCmd.ts b/backend/src/plugins/Utility/commands/CleanCmd.ts index 89605cd8..ecfc18d4 100644 --- a/backend/src/plugins/Utility/commands/CleanCmd.ts +++ b/backend/src/plugins/Utility/commands/CleanCmd.ts @@ -78,7 +78,9 @@ export const CleanCmd = utilityCmd({ if (targetChannel.id !== msg.channel.id) { const configForTargetChannel = pluginData.config.getMatchingConfig({ userId: msg.author.id, + member: msg.member, channelId: targetChannel.id, + categoryId: targetChannel.parentID, }); if (configForTargetChannel.can_clean !== true) { sendErrorMessage(pluginData, msg.channel, `Missing permissions to use clean on that channel`);