From b47872bf874a1a0ec5717e742466046305dd76d7 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 30 Nov 2019 22:23:02 +0200 Subject: [PATCH] utility: fix !clean response delete behaviour The !clean response is intended to be deleted after a delay when cleaning the current channel i.e. not specifying a different channel to clean. This behaviour was reversed, so the response got deleted when cleaning a different channel and stayed when cleaning the current channel. --- backend/src/plugins/Utility.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility.ts b/backend/src/plugins/Utility.ts index 0e438c8f..b4153df0 100644 --- a/backend/src/plugins/Utility.ts +++ b/backend/src/plugins/Utility.ts @@ -720,7 +720,7 @@ export class UtilityPlugin extends ZeppelinPlugin { responseMsg = await msg.channel.createMessage(errorMessage(`Found no messages to clean!`)); } - if (targetChannel.id !== msg.channel.id) { + if (targetChannel.id === msg.channel.id) { // Delete the !clean command and the bot response if a different channel wasn't specified // (so as not to spam the cleaned channel with the command itself) setTimeout(() => {