diff --git a/lib/routes/Channels.ts b/lib/routes/Channels.ts index cf508e0c..6fbf690e 100644 --- a/lib/routes/Channels.ts +++ b/lib/routes/Channels.ts @@ -1112,7 +1112,7 @@ export default class Channels { limit: options.limit, [chosenOption]: options[chosenOption] }); - for (const message of messages) { + for (const message of Array.from(messages)) { const f = filter(message); if (f === false) { messages.splice(messages.indexOf(message), 1);