mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-01-26 03:11:36 +00:00
[AB-90] adding poll functionality
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "cancelPoll_response_text"/>",
|
||||
"messageConfig": {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "closePoll_response_text"/>",
|
||||
"messageConfig": {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"description": "<@safe_include "poll_server_close_message_description"/>"
|
||||
<#if text?has_content>,
|
||||
"fields": [
|
||||
{
|
||||
"name": "<@safe_include "poll_server_close_message_embed_text_field_title"/>",
|
||||
"value": "${text?json_string}"
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
"referencedMessageId": "${pollMessageId?c}"
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "${modalId}",
|
||||
"title": "<@safe_include "poll_server_add_option_modal_title"/>",
|
||||
"textInputs": [
|
||||
{
|
||||
"placeHolder": "<@safe_include "poll_server_add_option_modal_label_placeholder"/>",
|
||||
"id": "${labelInputComponentId}",
|
||||
"position": 1,
|
||||
"label": "<@safe_include "poll_server_add_option_modal_label_label"/>",
|
||||
"style": "paragraph",
|
||||
"maxLength": 100,
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"placeHolder": "<@safe_include "poll_server_add_option_modal_description_placeholder"/>",
|
||||
"id": "${descriptionInputComponentId}",
|
||||
"position": 2,
|
||||
"label": "<@safe_include "poll_server_add_option_modal_description_label"/>",
|
||||
"style": "paragraph",
|
||||
"maxLength": 100,
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "poll_add_option_notification_message"/>",
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "poll_decision_notification_message"/>",
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": {
|
||||
"title": "<@safe_include "poll_server_evaluation_title"/>"
|
||||
},
|
||||
<#include "abstracto_color">,
|
||||
"description": "<#list options as option><#assign option=option><@safe_include "poll_message_option_display_always"/><#sep>\n</#list>"
|
||||
}
|
||||
],
|
||||
"referencedMessageId": "${pollMessageId?c}"
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<#include "format_instant">
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": {
|
||||
"title": "<@safe_include "poll_server_message_title"/>"
|
||||
},
|
||||
<#assign formattedEndDate><@format_instant_relative instant=endDate/></#assign>
|
||||
"description": "<@safe_include "poll_server_description_info"/><#list options as option><#assign option=option><@safe_include "poll_message_option_display"/><#sep>\n</#list>"
|
||||
}
|
||||
],
|
||||
"selectionMenus": [
|
||||
{
|
||||
"position": 1,
|
||||
"id": "${selectionMenuId}",
|
||||
"type": "STRING",
|
||||
"minValues": 1,
|
||||
<#if allowMultiple>
|
||||
"maxValues": ${options?size},
|
||||
<#else>
|
||||
"maxValues": 1,
|
||||
</#if>
|
||||
"menuEntries": [
|
||||
<#list options as option>
|
||||
{
|
||||
"value": "${option.value}",
|
||||
"label": "${option.label}",
|
||||
"description": "${option.description}"
|
||||
}
|
||||
<#sep>,</#list>
|
||||
]
|
||||
}
|
||||
]
|
||||
<#if allowAdditions && options?size lt 20>,
|
||||
"buttons": [
|
||||
{
|
||||
"label": "add option",
|
||||
"position": 2,
|
||||
"id": "${addOptionButtonId}",
|
||||
"buttonStyle": "secondary",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<#include "format_instant">
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color"/>,
|
||||
<#assign pollId=pollId>
|
||||
<#assign description=description>
|
||||
"description": "<@safe_include "poll_reminder_job_notification_message_description"/><#list topOptions as option><#assign option=option><@safe_include "poll_message_option_display_always"/><#sep>\n</#list>"
|
||||
}
|
||||
],
|
||||
"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "poll_server_reminder_job_button_jump"/>",
|
||||
"url": "${messageLink?json_string}",
|
||||
"buttonStyle": "link",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "poll_server_response_text"/>"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"additionalMessage": "<@safe_include "poll_quick_decision_notification_message"/>",
|
||||
"messageConfig" : {
|
||||
"ephemeral": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": {
|
||||
"title": "<@safe_include "poll_quick_evaluation_title"/>"
|
||||
},
|
||||
<#include "abstracto_color">,
|
||||
"description": "<#list options as option><#assign option=option><@safe_include "poll_message_option_display_always"/><#sep>\n</#list>"
|
||||
}
|
||||
],
|
||||
"referencedMessageId": "${pollMessageId?c}"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<#include "format_instant">
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": {
|
||||
"title": "<@safe_include "poll_quick_message_title"/>"
|
||||
},
|
||||
<#assign formattedEndDate><@format_instant_relative instant=endDate/></#assign>
|
||||
"description": "<@safe_include "poll_quick_description_info"/><#list options as option><#assign option=option><@safe_include "poll_quick_message_option_display"/><#sep>\n</#list>"
|
||||
}
|
||||
],
|
||||
"selectionMenus": [
|
||||
{
|
||||
"position": 1,
|
||||
"id": "${selectionMenuId}",
|
||||
"type": "STRING",
|
||||
"minValues": 1,
|
||||
<#if allowMultiple>
|
||||
"maxValues": ${options?size},
|
||||
<#else>
|
||||
"maxValues": 1,
|
||||
</#if>
|
||||
"menuEntries": [
|
||||
<#list options as option>
|
||||
{
|
||||
"value": "${option.value}",
|
||||
"label": "${option.label}",
|
||||
"description": "${option.description}"
|
||||
}
|
||||
<#sep>,</#list>
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "poll_cancellation_not_possible_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "poll_option_already_exists_exception_text">
|
||||
Reference in New Issue
Block a user