diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 7f4bee9676..cd3e08786f 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -353,7 +353,7 @@ class Channel extends Base { while (msgs.length < searchOptions.limit) { const loadedMessages = await window .require('WAWebChatLoadMessages') - .loadEarlierMsgs(channel); + .loadEarlierMsgs({ chat: channel }); if (!loadedMessages || !loadedMessages.length) break; msgs = [...loadedMessages.filter(msgFilter), ...msgs]; } diff --git a/src/structures/Chat.js b/src/structures/Chat.js index 8cea7c134e..40211bf04d 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -226,7 +226,7 @@ class Chat extends Base { while (msgs.length < searchOptions.limit) { const loadedMessages = await window .require('WAWebChatLoadMessages') - .loadEarlierMsgs(chat, chat.msgs); + .loadEarlierMsgs({ chat }); if (!loadedMessages || !loadedMessages.length) break; msgs = [...loadedMessages.filter(msgFilter), ...msgs]; }