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

perf(arrays): Improved array looping

This commit is contained in:
unknown 2021-05-02 02:53:18 -04:00
parent edd78fc9c6
commit f9520ab434
No known key found for this signature in database
GPG key ID: 5D70E03C78E749BA
12 changed files with 45 additions and 37 deletions

View file

@ -129,7 +129,8 @@ export const CleanCmd = utilityCmd({
if (potentialMessagesToClean.length === 0) break;
const filtered: SavedMessage[] = [];
for (const message of potentialMessagesToClean) {
for (let i = 0; i < potentialMessagesToClean.length; ++i) {
const message = potentialMessagesToClean[i];
const contentString = message.data.content || "";
if (args.user && message.user_id !== args.user) continue;
if (args.bots && !message.is_bot) continue;