mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 01:04:13 +02:00
fix(arabot): move interaction updates out of the loop
This commit is contained in:
parent
bb794ccf7c
commit
63611566bc
@ -98,6 +98,8 @@ export class purgeVerifyingCommand extends Command {
|
||||
return `${minutes}:${(seconds < 10 ? '0' : '') + seconds}`;
|
||||
}
|
||||
|
||||
await interaction.editReply(`Processing ${verVeganLength} users...\nEstimated time to completion: ${calcETA(apiTimeout, 0, verVeganLength)}`);
|
||||
|
||||
// Goes through every member with the verify-as-vegan role
|
||||
for (let i = 0; i < verVeganLength; i++) {
|
||||
const member = verVegan[i];
|
||||
@ -109,7 +111,6 @@ export class purgeVerifyingCommand extends Command {
|
||||
await member.roles.remove(IDs.roles.verifyingAsVegan);
|
||||
await member.roles.add(IDs.roles.nonvegan.nonvegan);
|
||||
}
|
||||
await interaction.editReply(`Processed ${i + 1}/${verVeganLength} users\nEstimated time to completion: ${calcETA(apiTimeout, i, verVeganLength)}`);
|
||||
}, apiTimeout * i);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user