3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

starboard: don't include image link when discord hides it

This commit is contained in:
Dragory 2020-12-23 02:37:08 +02:00
parent b5d659fdcc
commit 223de75157

View file

@ -28,7 +28,9 @@ export async function saveMessageToStarboard(
embed.author.icon_url = msg.author.avatarURL;
}
if (msg.content) {
// The second condition here checks for messages with only an image link that is then embedded.
// The message content in that case is hidden by the Discord client, so we hide it here too.
if (msg.content && msg.embeds[0]?.thumbnail?.url !== msg.content) {
embed.description = msg.content;
}