[AB-268] adding templates for suggestion button features

This commit is contained in:
Sheldan
2021-09-06 01:43:05 +02:00
parent 19135a7312
commit a14b6f4d67
16 changed files with 81 additions and 13 deletions

View File

@@ -0,0 +1,6 @@
{
<#include "abstracto_color">,
<#assign agreements=agreements>
<#assign disagreements=disagreements>
"description": "<@safe_include "suggestion_info_response_embed_description"/>"
}

View File

@@ -9,6 +9,34 @@
<#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
}
},
{
"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
}
}
],
</#if>
"footer": {
"text": "<@safe_include "suggest_suggestion_id_footer"/>"
}

View File

@@ -1,19 +1,25 @@
{
<#assign id>${suggestionId}</#assign>
"additionalMessage": "<@safe_include "suggest_state_${state?lower_case}_comment"/>",
<#if reason?has_content || message?? && message.attachments?size gt 0>
<#include "abstracto_color">,
<#if message?? && message.attachments?size gt 0>
"imageUrl": "${message.attachments[0].proxyUrl}",
</#if>
<#if reason?has_content>
"fields": [
{
"name": "<@safe_include "suggest_reason_field_title"/>",
"value": "${reason?json_string}"
}
],
</#if>
<#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}"
}

View File

@@ -0,0 +1,8 @@
{
<#include "abstracto_color">,
"metaConfig" : {
"preventEmptyEmbed": "true",
"ephemeral": true
},
"description": "<@safe_include "suggestion_vote_cast_notification_text"/>"
}

View File

@@ -0,0 +1,8 @@
{
<#include "abstracto_color">,
"metaConfig" : {
"preventEmptyEmbed": "true",
"ephemeral": true
},
"description": "<@safe_include "suggestion_vote_removed_notification_text"/>"
}

View File

@@ -0,0 +1 @@
Shows information about suggestions

View File

@@ -0,0 +1,2 @@
Shows the amount of agreeing and disagreeing members of a given suggestions.
Only shows the amount as long the suggestion has not been removed from the database.

View File

@@ -0,0 +1 @@
The ID of the suggestion to show information for

View File

@@ -0,0 +1 @@
There are ${agreements} agreeing and ${disagreements} disagreeing members.