Include fallback text for replies to media
This commit is contained in:
parent
011f9c5ecb
commit
f4bfe54850
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,9 @@ async function messageToEvent(message, guild, api) {
|
||||||
repliedToDisplayName = message.referenced_message?.author.global_name || message.referenced_message?.author.username || "a Discord user"
|
repliedToDisplayName = message.referenced_message?.author.global_name || message.referenced_message?.author.username || "a Discord user"
|
||||||
repliedToUserHtml = repliedToDisplayName
|
repliedToUserHtml = repliedToDisplayName
|
||||||
}
|
}
|
||||||
const repliedToContent = message.referenced_message?.content || "[Replied-to message content wasn't provided by Discord]"
|
let repliedToContent = message.referenced_message?.content
|
||||||
|
if (repliedToContent == "") repliedToContent = "[Media]"
|
||||||
|
else if (!repliedToContent) repliedToContent = "[Replied-to message content wasn't provided by Discord]"
|
||||||
const repliedToHtml = markdown.toHTML(repliedToContent, {
|
const repliedToHtml = markdown.toHTML(repliedToContent, {
|
||||||
discordCallback: getDiscordParseCallbacks(message, true)
|
discordCallback: getDiscordParseCallbacks(message, true)
|
||||||
}, null, null)
|
}, null, null)
|
||||||
|
|
Loading…
Reference in a new issue