Fix error when forwarding a crosspost lacks author
This commit is contained in:
@@ -641,8 +641,7 @@ async function messageToEvent(message, guild, options = {}, di) {
|
|||||||
html = "* " + html
|
html = "* " + html
|
||||||
}
|
}
|
||||||
|
|
||||||
const flags = message.flags || 0
|
if (((message.flags || 0) & DiscordTypes.MessageFlags.IsCrosspost) && message.author?.username) {
|
||||||
if (flags & DiscordTypes.MessageFlags.IsCrosspost) {
|
|
||||||
body = `[↷ ${message.author.username}]\n` + body
|
body = `[↷ ${message.author.username}]\n` + body
|
||||||
html = `↷ <strong>${message.author.username}</strong><br>` + html
|
html = `↷ <strong>${message.author.username}</strong><br>` + html
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user