From bb794ccf7cdded3201af21fdc4f2303d049f3345 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 30 Jul 2022 02:41:31 +0100 Subject: [PATCH 1/2] fix(arabot): typo in progress for purgeverifying --- src/commands/verification/purgeVerifying.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/verification/purgeVerifying.ts b/src/commands/verification/purgeVerifying.ts index f62d786..5eb8a64 100644 --- a/src/commands/verification/purgeVerifying.ts +++ b/src/commands/verification/purgeVerifying.ts @@ -108,8 +108,8 @@ export class purgeVerifyingCommand extends Command { || member.roles.cache.has(IDs.roles.vegan.vegan))) { await member.roles.remove(IDs.roles.verifyingAsVegan); await member.roles.add(IDs.roles.nonvegan.nonvegan); - await interaction.editReply(`Processed ${i + 1}/${verVeganLength} users\nEstimate time to completion: ${calcETA(apiTimeout, i, verVeganLength)}`); } + await interaction.editReply(`Processed ${i + 1}/${verVeganLength} users\nEstimated time to completion: ${calcETA(apiTimeout, i, verVeganLength)}`); }, apiTimeout * i); } From 63611566bcf0b11f7cedd1ef0166def31e140a0b Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 30 Jul 2022 02:56:52 +0100 Subject: [PATCH 2/2] fix(arabot): move interaction updates out of the loop --- src/commands/verification/purgeVerifying.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/verification/purgeVerifying.ts b/src/commands/verification/purgeVerifying.ts index 5eb8a64..e93138b 100644 --- a/src/commands/verification/purgeVerifying.ts +++ b/src/commands/verification/purgeVerifying.ts @@ -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); }