diff --git a/src/execution.ts b/src/execution.ts index 5982a6f..5ece5a1 100644 --- a/src/execution.ts +++ b/src/execution.ts @@ -280,7 +280,7 @@ async function executeFromQueue(channel: string) { } else { const answerMessagesContent :string[] = [""]; - for (const i in answerContent.split(/\n\n/)) { + for (const i of answerContent.split(/\n\n/)) { if (answerMessagesContent[answerMessagesContent.length-1].length + i.length < 2000) { answerMessagesContent[answerMessagesContent.length-1] += "\n\n" + i; } @@ -289,7 +289,7 @@ async function executeFromQueue(channel: string) { } } - for (const i in answerMessagesContent) { + for (const i of answerMessagesContent) { const response = requestReply(message, {content: i}, {allowedMentions: { repliedUser: false }}); response.then(rval => Moderation.checkMessage(rval));