[AB-242] adding templates for suggestion improvements containing veto, unsuggest and splitting suggest message templates

updating help templates
fixing template for deleted users doing a double safe include leading to incorrect json structure
This commit is contained in:
Sheldan
2021-04-30 01:29:15 +02:00
parent d0cce94d09
commit efc5a72339
19 changed files with 54 additions and 51 deletions

View File

@@ -3,7 +3,7 @@
<#include "user_author">
<@user_author user=author/>
<#else>
<@safe_include "deleted_user_author"/>
<#include "deleted_user_author"/>
</#if>,
<#include "abstracto_color">,
<#if embeddedMessage.content?has_content || embeddedMessage.embeds?size gt 0>

View File

@@ -0,0 +1,15 @@
{
<#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"/>"
}
}

View File

@@ -1,45 +0,0 @@
{
"author": {
<#if suggester?has_content>
"name": "<@member_user_name member=suggester/>",
"avatar": "${suggester.user.effectiveAvatarUrl}"
<#else>
"name": "${suggesterUser.userReference.id?c} (<@safe_include "user_left_server"/>)"
</#if>
},
<#assign user><@member_user_name member=member/></#assign>
<#if state = "ACCEPTED">
"title": {
"title": "<@safe_include "suggest_accepted_by"/>"
},
<#elseif state = "REJECTED">
"title": {
"title": "<@safe_include "suggest_rejected_by"/>"
},
</#if>
<#include "abstracto_color">,
<#assign id>${suggestionId}</#assign>
<#if state = "ACCEPTED" || state = "REJECTED">
"description": "~~${text?json_string}~~",
<#else>
"description": "${text?json_string}",
</#if>
<#if state = "ACCEPTED" || state = "REJECTED">
"fields": [
{
"name": "<@safe_include "suggest_link_field_title"/>",
"value": "[<@safe_include "suggest_link_display_value"/>](${originalMessageUrl})"
}
<#if reason?has_content>
,
{
"name": "<@safe_include "suggest_reason_field_title"/>",
"value": "${reason?json_string}"
}
</#if>
],
</#if>
"footer": {
"text": "<@safe_include "suggest_suggestion_id_footer"/>"
}
}

View File

@@ -0,0 +1,19 @@
{
<#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>
</#if>
"referencedMessageId": "${originalMessageId?c}"
}

View File

@@ -1 +0,0 @@
<#include "suggestion_update_exception_text">

View File

@@ -0,0 +1 @@
<#include "un_suggest_not_possible_exception_text">

View File

@@ -1 +1,3 @@
Accepts the given suggestion. Will post the suggestion again, with the given reason for acceptance, with the old text strike through and 'Accepted by' as a notice.
Accepts the given suggestion. Will post a message indicating which suggestion was accepted and reply to the original message containing the suggestion.
This command is not final. A suggestion can be rejected/accepted/vetoed multiple times. Once it reaches any of the final states, it will be deleted from the database after a few days.
After that no actions are possible.

View File

@@ -0,0 +1 @@
✅ Suggestion ${suggestionId?c} has been accepted

View File

@@ -1 +1,3 @@
Rejects the given suggestion. Will post the suggestion again, with the given reason for rejection, with the old text strike through and 'Rejected by' as a notice.
Rejects the given suggestion. Will post a message indicating which suggestion was rejected and reply to the original message containing the suggestion.
This command is not final. A suggestion can be rejected/accepted/vetoed multiple times. Once it reaches any of the final states, it will be deleted from the database after a few days.
After that no actions are possible.

View File

@@ -0,0 +1 @@
❌ Suggestion ${suggestionId?c} has been rejected

View File

@@ -0,0 +1 @@
Vetos the given suggestion.

View File

@@ -0,0 +1 @@
`veto 1 not okay` in order to veto the suggestion `1` with the reason `not okay`

View File

@@ -0,0 +1,3 @@
Vetos a given suggestion. The difference to the `reject` command is that the text and the state is a different one.
This command is not final. A suggestion can be rejected/accepted/vetoed multiple times. Once it reaches any of the final states, it will be deleted from the database after a few days.
After that no actions are possible.

View File

@@ -0,0 +1 @@
The ID of the suggestion you want to veto.

View File

@@ -0,0 +1 @@
The text you want to provide in the notification when vetoing a suggestion.

View File

@@ -0,0 +1 @@
🛑 Suggestion ${suggestionId?c} has been vetoed

View File

@@ -1 +1 @@
Suggestion ${suggestionId} does not exist.
Suggestion ${suggestionId?c} does not exist.

View File

@@ -0,0 +1 @@
Not possible to remove suggestion.