Merge pull request #102 from DarkView/fr_cleaningMessageOnClean
Post a message letting the mod know we are now cleaning
This commit is contained in:
commit
19b97bc32b
1 changed files with 4 additions and 0 deletions
|
@ -88,6 +88,8 @@ export const CleanCmd = utilityCmd({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cleaningMessage = msg.channel.createMessage("Cleaning...");
|
||||||
|
|
||||||
const messagesToClean = [];
|
const messagesToClean = [];
|
||||||
let beforeId = msg.id;
|
let beforeId = msg.id;
|
||||||
const timeCutoff = msg.timestamp - MAX_CLEAN_TIME;
|
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!`);
|
responseMsg = await sendErrorMessage(pluginData, msg.channel, `Found no messages to clean!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await (await cleaningMessage).delete();
|
||||||
|
|
||||||
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
|
// 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)
|
// (so as not to spam the cleaned channel with the command itself)
|
||||||
|
|
Loading…
Add table
Reference in a new issue