[AB-xxx] refactoring the modmail to use users instead of members

adding modmailAppeal templates
This commit is contained in:
Sheldan
2024-05-31 01:16:17 +02:00
parent 4a341ed479
commit 88ed051af4
11 changed files with 18 additions and 11 deletions

View File

@@ -1 +1,2 @@
<#macro user_author user> "author": { "name": <#include "user_user_name"> "<@user_user_name user=user/>", "avatar": "${user.effectiveAvatarUrl}" }</#macro> <#macro user_author user> "author": { "name": <#include "user_user_name"> "<@user_user_name user=user/>", "avatar": "${user.effectiveAvatarUrl}" }</#macro>
<#macro user_detail_author user> "author": { "name": <#include "user_user_name"> "<@user_user_name user=userDisplay/>"<#if user.avatarUrl?has_content>, "avatar": "${user.avatarUrl}"</#if>}</#macro>

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "denyModmailAppeal_response_text"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -1,13 +1,12 @@
<#include "user_detail">
{ {
"embeds": [ "embeds": [
{ {
<#include "member_author">
<@member_author member=member/>,
"title": { "title": {
"title": "<@safe_include "modmail_notification_message_title"/>" "title": "<@safe_include "modmail_notification_message_title"/>"
}, },
<#include "modmail_color">, <#include "modmail_color">,
<#assign user><@member_user_name member=member/>(${member.user.id})</#assign> <#assign user><@user_detail user=userDisplay/></#assign>
"description": "<@safe_include "modmail_notification_message_description"/>" "description": "<@safe_include "modmail_notification_message_description"/>"
<#if channel?has_content>, <#if channel?has_content>,
"fields": [ "fields": [

View File

@@ -1,8 +1,8 @@
{ {
"embeds": [ "embeds": [
{ {
<#include "member_author"> <#include "user_author">
<@member_author member=member/>, <@user_detail_author user=userDisplay/>,
"title": { "title": {
"title": "<@safe_include "modmail_thread_user_message_title"/>" "title": "<@safe_include "modmail_thread_user_message_title"/>"
}, },

View File

@@ -1,13 +1,10 @@
<#include "format_instant"> <#include "format_instant">
<#include "user_detail">
{ {
"embeds": [ "embeds": [
{ {
<#include "member_author">
<@member_author member=member/>,
<#include "modmail_color">, <#include "modmail_color">,
<#assign user><@member_user_name member=member/> (${member.user.id})</#assign> <#assign user><@user_detail user=userDisplay/> (${userDisplay.id?c})</#assign>
<#assign joinDate><@format_instant_date_time instant=memberJoinDate/></#assign>
<#assign roles><#list member.roles as role>${role.asMention?json_string}<#sep>,<#else><@safe_include "modmail_thread_header_no_roles"/></#list></#assign>
"description": "<@safe_include "modmail_thread_header_embed_description"/>" "description": "<@safe_include "modmail_thread_header_embed_description"/>"
} }
] ]

View File

@@ -0,0 +1 @@
User has been banned from the appeal server.

View File

@@ -0,0 +1 @@
Rejects the appeal, closes the modmail thread and bans the user from the appeal server.

View File

@@ -0,0 +1 @@
The reason to reject this appeal. Will not be forwarded to the user.

View File

@@ -0,0 +1 @@
The server to use as an appeal server. Default: ${defaultValue}

View File

@@ -1,3 +1,2 @@
This is a modmail thread concerning ${user}. This is a modmail thread concerning ${user}.
The user has the roles ${roles} and joined on ${joinDate}
There were ${pastModMailThreadCount} threads in the past. There were ${pastModMailThreadCount} threads in the past.