utility: fix !clean permission check

This commit is contained in:
Dragory 2020-07-30 22:51:48 +03:00
parent e46d8e15da
commit cdd64d7128
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -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`);