3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 02:25:01 +00:00

fix: fix reactions in the channel archiver command

This commit is contained in:
BanTheNons 2021-12-04 20:09:28 +01:00
parent ff160be1fa
commit e545b32686
No known key found for this signature in database
GPG key ID: 7EFCD7941FA1F11E

View file

@ -81,9 +81,9 @@ export const ArchiveChannelCmd = channelArchiverCmd({
} }
} }
if (message.reactions && Object.keys(message.reactions).length > 0) { if (message.reactions.cache.size > 0) {
const reactionCounts: string[] = []; 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}`); reactionCounts.push(`${info.count}x ${emoji}`);
} }
content += `\n-- Reactions: ${reactionCounts.join(", ")}`; content += `\n-- Reactions: ${reactionCounts.join(", ")}`;