diff --git a/src/plugins/ChannelArchiver.ts b/src/plugins/ChannelArchiver.ts index 4704630b..3ce48be9 100644 --- a/src/plugins/ChannelArchiver.ts +++ b/src/plugins/ChannelArchiver.ts @@ -106,6 +106,7 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin { let content = `[${ts}] [${message.author.id}] [${message.author.username}#${ message.author.discriminator }]: ${message.content || ""}`; + if (message.attachments.length) { if (args["attachment-channel"]) { const rehostedAttachmentUrl = await this.rehostAttachment( @@ -118,6 +119,14 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin { } } + if (message.reactions && Object.keys(message.reactions).length > 0) { + const reactionCounts = []; + for (const [emoji, info] of Object.entries(message.reactions)) { + reactionCounts.push(`${info.count}x ${emoji}`); + } + content += `\n-- Reactions: ${reactionCounts.join(", ")}`; + } + archiveLines.push(content); previousId = message.id; archivedMessages++;