mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
Round time values in !massban
This commit is contained in:
parent
853394ecad
commit
64d6bb81fe
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ export const MassbanCmd = modActionsCmd({
|
|||
|
||||
// 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 maxWaitTimeFormatted = humanizeDurationShort(maxWaitTime, { round: true });
|
||||
const initialLoadingText =
|
||||
pluginData.state.massbanQueue.length === 0
|
||||
? "Banning..."
|
||||
|
@ -64,7 +64,7 @@ export const MassbanCmd = modActionsCmd({
|
|||
|
||||
const waitTimeStart = performance.now();
|
||||
const waitingInterval = setInterval(() => {
|
||||
const waitTime = humanizeDurationShort(performance.now() - waitTimeStart);
|
||||
const waitTime = humanizeDurationShort(performance.now() - waitTimeStart, { round: true });
|
||||
loadingMsg
|
||||
.edit(`Massban queued. Still waiting for previous massban to finish (waited ${waitTime}).`)
|
||||
.catch(() => clearInterval(waitingInterval));
|
||||
|
@ -117,7 +117,7 @@ export const MassbanCmd = modActionsCmd({
|
|||
}
|
||||
|
||||
const totalTime = performance.now() - startTime;
|
||||
const formattedTimeTaken = humanizeDurationShort(totalTime);
|
||||
const formattedTimeTaken = humanizeDurationShort(totalTime, { round: true });
|
||||
|
||||
// Clear loading indicator
|
||||
loadingMsg.delete().catch(noop);
|
||||
|
|
Loading…
Add table
Reference in a new issue