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:
parent
edd78fc9c6
commit
f9520ab434
12 changed files with 45 additions and 37 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue