[AB-203] adapting templates to new model structures

This commit is contained in:
Sheldan
2021-03-21 16:27:16 +01:00
parent 8cb131594c
commit 5a72c96537
5 changed files with 9 additions and 15 deletions

View File

@@ -0,0 +1 @@
<#macro user_author user> "author": { "name": <#include "user_user_name"> "<@user_user_name user=user/>", "avatar": "${user.effectiveAvatarUrl}" }</#macro>

View File

@@ -0,0 +1 @@
<#macro user_user_name user>${user.name?js_string}#${user.discriminator}</#macro>

View File

@@ -1,8 +1,6 @@
{
"author": {
"name": "${author.name?js_string}#${author.discriminator}",
"avatar": "${author.effectiveAvatarUrl}"
},
<#include "user_author">
<@user_author user=author/>,
<#include "abstracto_color">,
<#if embeddedMessage.content?has_content || embeddedMessage.embeds?size gt 0>
"description": "${embeddedMessage.content?js_string}

View File

@@ -10,7 +10,7 @@
},
{
"name": "<@safe_include "messageEdited_new_message_field_title"/>",
"value": "${messageAfter.content?js_string}"
"value": "${messageAfter.contentRaw?js_string}"
},
{
"name": "<@safe_include "messageEdited_link_field_title"/>",

View File

@@ -1,12 +1,6 @@
{
"author": {
<#if author?has_content>
"name": "<@member_user_name member=author/>",
"avatar": "${author.user.effectiveAvatarUrl}"
<#else>
"name": "${user.id?c} (<@safe_include "user_left_server"/>)"
</#if>
},
<#include "user_author">
<@user_author user=author/>,
<#include "abstracto_color">,
<#if message.content?has_content || message.embeds?size gt 0>
"description": "${message.content?js_string}
@@ -25,7 +19,7 @@
<#assign channelMention>${channel.asMention?js_string}</#assign>
,"additionalMessage": "<@safe_include "starboard_post_embed_additional_message"/>"
<#else>
<#assign channelMention>${aChannel.id?c}</#assign>
<#assign channelMention>${sourceChannelId?c}</#assign>
,"additionalMessage": "<@safe_include "starboard_post_embed_additional_message"/>"
</#if>
<#if message.attachments?size gt 0>
@@ -37,7 +31,7 @@
<#if channel?has_content>
,"value": "[${channel.name?js_string}](${message.messageUrl})"
<#else>
,"value": "[${aChannel.id?c}](${message.messageUrl})"
,"value": "[${sourceChannelId?c}](${message.messageUrl})"
</#if>
}
],