mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-01-28 08:38:44 +00:00
[AB-349] refactoring templates to have the new multi embed structure
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
<#assign agreements=agreements>
|
||||
<#assign disagreements=disagreements>
|
||||
"description": "<@safe_include "suggestion_info_response_embed_description"/>"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
<#assign agreements=agreements>
|
||||
<#assign disagreements=disagreements>
|
||||
"description": "<@safe_include "suggestion_info_response_embed_description"/>"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,43 +1,47 @@
|
||||
{
|
||||
<#include "user_author">
|
||||
<@user_author user=suggester/>,
|
||||
<#include "user_user_name">
|
||||
<#assign user><@user_user_name user=suggester/></#assign>
|
||||
<#include "abstracto_color">,
|
||||
<#assign id>${suggestionId}</#assign>
|
||||
"description": "${text?json_string}",
|
||||
<#if message?? && message.attachments?size gt 0>
|
||||
"imageUrl": "${message.attachments[0].proxyUrl}",
|
||||
</#if>
|
||||
<#if useButtons>
|
||||
"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_agree_label"/>",
|
||||
"id": "${agreeButtonModel.buttonId}",
|
||||
"buttonStyle": "success",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
"embeds": [
|
||||
{
|
||||
<#include "user_author">
|
||||
<@user_author user=suggester/>,
|
||||
<#include "user_user_name">
|
||||
<#assign user><@user_user_name user=suggester/></#assign>
|
||||
<#include "abstracto_color">,
|
||||
<#assign id>${suggestionId}</#assign>
|
||||
"description": "${text?json_string}",
|
||||
<#if message?? && message.attachments?size gt 0>
|
||||
"imageUrl": "${message.attachments[0].proxyUrl}",
|
||||
</#if>
|
||||
"footer": {
|
||||
"text": "<@safe_include "suggest_suggestion_id_footer"/>"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_disagree_label"/>",
|
||||
"id": "${disAgreeButtonModel.buttonId}",
|
||||
"buttonStyle": "danger",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
]
|
||||
<#if useButtons>
|
||||
,"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_agree_label"/>",
|
||||
"id": "${agreeButtonModel.buttonId}",
|
||||
"buttonStyle": "success",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_disagree_label"/>",
|
||||
"id": "${disAgreeButtonModel.buttonId}",
|
||||
"buttonStyle": "danger",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_reset_vote_label"/>",
|
||||
"id": "${removeVoteButtonModel.buttonId}",
|
||||
"buttonStyle": "secondary",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "<@safe_include "suggest_button_reset_vote_label"/>",
|
||||
"id": "${removeVoteButtonModel.buttonId}",
|
||||
"buttonStyle": "secondary",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
],
|
||||
]
|
||||
</#if>
|
||||
"footer": {
|
||||
"text": "<@safe_include "suggest_suggestion_id_footer"/>"
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,24 @@
|
||||
<#include "format_instant">
|
||||
{
|
||||
<#assign suggestionId=suggestionId>
|
||||
<#assign suggestionDate><@format_instant_date_time instant=suggestionCreationDate/></#assign>
|
||||
<#assign suggestionLink=suggestionMessage.jumpUrl>
|
||||
<#assign agreements=suggestionInfo.agreements>
|
||||
<#assign disagreements=suggestionInfo.disagreements>
|
||||
<#include "abstracto_color"/>,
|
||||
"description": "<@safe_include "suggestionReminderJob_description"/>",
|
||||
"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "suggestionReminderJob_jump_button_label"/>",
|
||||
"url": "${suggestionLink?json_string}",
|
||||
"buttonStyle": "link",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
]
|
||||
"embeds": [
|
||||
{
|
||||
<#assign suggestionId=suggestionId>
|
||||
<#assign suggestionDate><@format_instant_date_time instant=suggestionCreationDate/></#assign>
|
||||
<#assign suggestionLink=suggestionMessage.jumpUrl>
|
||||
<#assign agreements=suggestionInfo.agreements>
|
||||
<#assign disagreements=suggestionInfo.disagreements>
|
||||
<#include "abstracto_color"/>,
|
||||
"description": "<@safe_include "suggestionReminderJob_description"/>"
|
||||
}
|
||||
],
|
||||
"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "suggestionReminderJob_jump_button_label"/>",
|
||||
"url": "${suggestionLink?json_string}",
|
||||
"buttonStyle": "link",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,25 +1,29 @@
|
||||
{
|
||||
<#assign id>${suggestionId}</#assign>
|
||||
"additionalMessage": "<@safe_include "suggest_state_${state?lower_case}_comment"/>",
|
||||
<#include "abstracto_color">,
|
||||
<#if message?? && message.attachments?size gt 0>
|
||||
"imageUrl": "${message.attachments[0].proxyUrl}",
|
||||
</#if>
|
||||
"fields": [
|
||||
<#if reason?has_content>
|
||||
{
|
||||
"name": "<@safe_include "suggest_reason_field_title"/>",
|
||||
"value": "${reason?json_string}"
|
||||
},
|
||||
</#if>
|
||||
{
|
||||
"name": "<@safe_include "suggestion_agreements_field_title"/>",
|
||||
"value": "${agreeVotes?c}"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "suggestion_disagreements_field_title"/>",
|
||||
"value": "${disAgreeVotes?c}"
|
||||
}
|
||||
],
|
||||
"referencedMessageId": "${originalMessageId?c}"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
<#if message?? && message.attachments?size gt 0>
|
||||
"imageUrl": "${message.attachments[0].proxyUrl}",
|
||||
</#if>
|
||||
"fields": [
|
||||
<#if reason?has_content>
|
||||
{
|
||||
"name": "<@safe_include "suggest_reason_field_title"/>",
|
||||
"value": "${reason?json_string}"
|
||||
},
|
||||
</#if>
|
||||
{
|
||||
"name": "<@safe_include "suggestion_agreements_field_title"/>",
|
||||
"value": "${agreeVotes?c}"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "suggestion_disagreements_field_title"/>",
|
||||
"value": "${disAgreeVotes?c}"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"referencedMessageId": "${originalMessageId?c}",
|
||||
<#assign id>${suggestionId}</#assign>
|
||||
"additionalMessage": "<@safe_include "suggest_state_${state?lower_case}_comment"/>"
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true",
|
||||
"ephemeral": true
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_agreement_notification_text"/>"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true"
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_agreement_notification_text"/>"
|
||||
}
|
||||
],
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true",
|
||||
"ephemeral": true
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_disagreement_notification_text"/>"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true"
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_disagreement_notification_text"/>"
|
||||
}
|
||||
],
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true",
|
||||
"ephemeral": true
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_removed_notification_text"/>"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"metaConfig" : {
|
||||
"preventEmptyEmbed": "true"
|
||||
},
|
||||
"description": "<@safe_include "suggestion_vote_removed_notification_text"/>"
|
||||
}
|
||||
],
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user