mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fixed fatal error for massbans
This commit is contained in:
parent
e879a15aa4
commit
ee861bb5e9
1 changed files with 7 additions and 3 deletions
|
@ -57,9 +57,13 @@ export async function actualMassBanCmd(
|
|||
const waitTimeStart = performance.now();
|
||||
const waitingInterval = setInterval(() => {
|
||||
const waitTime = humanizeDurationShort(performance.now() - waitTimeStart, { round: true });
|
||||
loadingMsg
|
||||
.edit(`Massban queued. Still waiting for previous massban to finish (waited ${waitTime}).`)
|
||||
.catch(() => clearInterval(waitingInterval));
|
||||
const waitMessageContent = `Massban queued. Still waiting for previous massban to finish (waited ${waitTime}).`;
|
||||
|
||||
if (isContextInteraction(context)) {
|
||||
context.editReply(waitMessageContent).catch(() => clearInterval(waitingInterval));
|
||||
} else {
|
||||
loadingMsg.edit(waitMessageContent).catch(() => clearInterval(waitingInterval));
|
||||
}
|
||||
}, 1 * MINUTES);
|
||||
|
||||
pluginData.state.massbanQueue.add(async () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue