3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

fix: reactions in the channel archiver command (#308)

Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
BanTheNons 2023-12-28 23:43:46 +03:00 committed by GitHub
parent b881245640
commit d09e0566b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(", ")}`;