From d09e0566b3461dbe92a533fbf0c2b8e62fe092b9 Mon Sep 17 00:00:00 2001 From: BanTheNons Date: Thu, 28 Dec 2023 23:43:46 +0300 Subject: [PATCH] fix: reactions in the channel archiver command (#308) Co-authored-by: Almeida --- .../src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts index 13a72a871..3fc1b72bb 100644 --- a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts +++ b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts @@ -82,9 +82,9 @@ export const ArchiveChannelCmd = channelArchiverCmd({ } } - if (message.reactions && Object.keys(message.reactions).length > 0) { + if (message.reactions.cache.size > 0) { const reactionCounts: string[] = []; - for (const [emoji, info] of Object.entries(message.reactions)) { + for (const [emoji, info] of message.reactions.cache) { reactionCounts.push(`${info.count}x ${emoji}`); } content += `\n-- Reactions: ${reactionCounts.join(", ")}`;