From 64f7b8cce4ff011a96dd053e8bcf04e5ff8112fc Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 10 Aug 2019 00:22:25 +0300 Subject: [PATCH] ChannelArchiver: fix archiving of the wrong channel --- src/plugins/ChannelArchiver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/ChannelArchiver.ts b/src/plugins/ChannelArchiver.ts index 859e30e7..a4bd2779 100644 --- a/src/plugins/ChannelArchiver.ts +++ b/src/plugins/ChannelArchiver.ts @@ -98,7 +98,7 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin { while (archivedMessages < maxMessagesToArchive) { const messagesToFetch = Math.min(MAX_MESSAGES_PER_FETCH, maxMessagesToArchive - archivedMessages); - const messages = await msg.channel.getMessages(messagesToFetch, previousId); + const messages = await args.channel.getMessages(messagesToFetch, previousId); for (const message of messages) { const ts = moment.utc(message.timestamp).format("YYYY-MM-DD HH:mm:ss");