3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

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.
This commit is contained in:
Dragory 2019-11-30 22:23:02 +02:00
parent 23a9a5e800
commit b47872bf87

View file

@ -720,7 +720,7 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
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(() => {