3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

Update backend/src/plugins/Utility/commands/CleanCmd.ts

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
metal 2023-03-10 21:01:39 +00:00 committed by GitHub
parent 2ad03267a5
commit 64a02c0eb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,10 +37,10 @@ export async function cleanMessages(
const chunks = chunkArray(idsToDelete, 100); const chunks = chunkArray(idsToDelete, 100);
await Promise.all( await Promise.all(
chunks.map(async (chunk) => { chunks.map((chunk) => Promise.all([
await channel.bulkDelete(chunk); channel.bulkDelete(chunk),
await pluginData.state.savedMessages.markBulkAsDeleted(chunk); pluginData.state.savedMessages.markBulkAsDeleted(chunk),
}), ]),
); );
// Create an archive // Create an archive