fix edits not being marked

This commit is contained in:
Cynthia Foxwell 2022-10-02 16:32:04 -06:00
parent 9dc3f1276d
commit 6b90fbd8d4

View file

@ -335,7 +335,11 @@ function processMessage(msg, options) {
formatMessage({
name: msg.author.username,
bot: msg.author.bot,
content: line,
content:
line +
(msg.editedTimestamp != null && index == lines.length - 1
? " (edited)"
: ""),
attachments: index == lines.length - 1 ? msg.attachments : [],
stickers: index == lines.length - 1 ? msg.stickerItems : [],
reply: index == 0 ? msg.referencedMessage : null,
@ -347,7 +351,7 @@ function processMessage(msg, options) {
formatMessage({
name: msg.author.username,
bot: msg.author.bot,
content: msg.content,
content: msg.content + (msg.editedTimestamp != null ? " (edited)" : ""),
attachments: msg.attachments,
stickers: msg.stickerItems,
reply: msg.referencedMessage,