mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-04-14 11:48:18 +00:00
[AB-220] fixing starboard posts using embeds without description
using the thumbnail of such an embed as attachment to the post
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<#list message.embeds>
|
<#list message.embeds>
|
||||||
<@safe_include "starboard_post_embed_embeds_name"/>:
|
<@safe_include "starboard_post_embed_embeds_name"/>:
|
||||||
<#items as embed>
|
<#items as embed>
|
||||||
<@safe_include "starboard_post_embed_description"/>: ${embed.description?json_string} <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if>
|
<#if embed.description??> <@safe_include "starboard_post_embed_description"/>: ${embed.description?json_string} </#if> <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if>
|
||||||
</#items>
|
</#items>
|
||||||
</#list>
|
</#list>
|
||||||
",
|
",
|
||||||
@@ -25,6 +25,9 @@
|
|||||||
<#if message.attachments?size gt 0>
|
<#if message.attachments?size gt 0>
|
||||||
,"imageUrl": "${message.attachments[0].proxyUrl}"
|
,"imageUrl": "${message.attachments[0].proxyUrl}"
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if message.attachments?size = 0 && message.embeds?size gt 0>
|
||||||
|
,"imageUrl": "${message.embeds[0].cachedThumbnail.proxyUrl}"
|
||||||
|
</#if>
|
||||||
,"fields": [
|
,"fields": [
|
||||||
{
|
{
|
||||||
"name": "<@safe_include "starboard_post_embed_original_field_title"/>"
|
"name": "<@safe_include "starboard_post_embed_original_field_title"/>"
|
||||||
|
|||||||
Reference in New Issue
Block a user