From 1e2466ecf6314f526abe65c1292dc3d718c0a7d0 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Sun, 2 Aug 2020 01:31:27 +0200 Subject: [PATCH] Post a message letting the mod know we are now cleaning --- backend/src/plugins/Utility/commands/CleanCmd.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/plugins/Utility/commands/CleanCmd.ts b/backend/src/plugins/Utility/commands/CleanCmd.ts index ecfc18d4..ca845a64 100644 --- a/backend/src/plugins/Utility/commands/CleanCmd.ts +++ b/backend/src/plugins/Utility/commands/CleanCmd.ts @@ -88,6 +88,8 @@ export const CleanCmd = utilityCmd({ } } + const cleaningMessage = msg.channel.createMessage("Cleaning..."); + const messagesToClean = []; let beforeId = msg.id; const timeCutoff = msg.timestamp - MAX_CLEAN_TIME; @@ -132,6 +134,8 @@ export const CleanCmd = utilityCmd({ responseMsg = await sendErrorMessage(pluginData, msg.channel, `Found no messages to clean!`); } + await (await cleaningMessage).delete(); + 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)