Show max wait time for massban queue in !massban
This commit is contained in:
parent
13e2959ded
commit
b4fb6de86e
1 changed files with 3 additions and 1 deletions
|
@ -54,10 +54,12 @@ export const MassbanCmd = modActionsCmd({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show a loading indicator since this can take a while
|
// Show a loading indicator since this can take a while
|
||||||
|
const maxWaitTime = pluginData.state.massbanQueue.timeout * pluginData.state.massbanQueue.length;
|
||||||
|
const maxWaitTimeFormatted = humanizeDurationShort(maxWaitTime);
|
||||||
const initialLoadingText =
|
const initialLoadingText =
|
||||||
pluginData.state.massbanQueue.length === 0
|
pluginData.state.massbanQueue.length === 0
|
||||||
? "Banning..."
|
? "Banning..."
|
||||||
: "Massban queued. Waiting for previous massban to finish.";
|
: `Massban queued. Waiting for previous massban to finish (max wait ${maxWaitTimeFormatted}).`;
|
||||||
const loadingMsg = await msg.channel.createMessage(initialLoadingText);
|
const loadingMsg = await msg.channel.createMessage(initialLoadingText);
|
||||||
|
|
||||||
const waitTimeStart = performance.now();
|
const waitTimeStart = performance.now();
|
||||||
|
|
Loading…
Add table
Reference in a new issue