From 71ac4d71a9b067d427b376116ee09893e655152e Mon Sep 17 00:00:00 2001 From: Navy Date: Sun, 20 Jun 2021 01:52:14 +0300 Subject: [PATCH] fixed infinite loop -.- --- structure/Modmail.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/structure/Modmail.js b/structure/Modmail.js index 8b9182b..63cbdb3 100644 --- a/structure/Modmail.js +++ b/structure/Modmail.js @@ -244,10 +244,7 @@ class Modmail { for (let i = context < len ? context : len; i > 0; i--) { const entry = history[len - i]; if (!entry) continue; - if (entry.markread) { - i++; - continue; - } + if (entry.markread) continue; const user = await this.client.resolveUser(entry.author).catch(this.client.logger.error.bind(this.client.logger)); const mem = await this.getMember(user.id).catch(this.client.logger.error.bind(this.client.logger));