added mod mail thread notification, if a user initiates a mod mail thread

added the concept of a mod mail role, these are roles being pinged when a thread is opened, and they also are able to execute mod mail related commands
fixed past thread count in mod mail header
added convenience method to allow a role to execute a whole feature
This commit is contained in:
Sheldan
2020-05-08 10:49:06 +02:00
parent ea6fe240f4
commit 7699075b33
27 changed files with 289 additions and 20 deletions

View File

@@ -1,3 +1,3 @@
abstracto.postTargets.modmail=modmaillog
abstracto.postTargets.modmail=modmaillog,modmailping
abstracto.emoteNames.readReaction=readReaction
abstracto.defaultEmotes.readReaction=\uD83D\uDC40

View File

@@ -0,0 +1,19 @@
{
"author": {
"name": "${threadUser.member.effectiveName}",
"avatar": "${threadUser.member.user.effectiveAvatarUrl}"
},
"title": {
"title": "<#include "modmail_notification_message_title">"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#assign user>${threadUser.member.effectiveName}#${threadUser.member.user.discriminator}(${threadUser.member.user.id})</#assign>
"description": "<#include "modmail_notification_message_description">"
<#if roles?size gt 0>
,"additionalMessage": "<#list roles as role>${role.role.asMention}<#sep>,</#list>"
</#if>
}

View File

@@ -11,6 +11,5 @@
<#assign user>${threadUser.member.effectiveName}#${threadUser.member.user.discriminator} (${threadUser.member.user.id})</#assign>
<#assign joinDate>${threadUser.member.timeJoined}</#assign>
<#assign roles><#list threadUser.member.roles as role>${role.asMention}<#sep>,<#else>No roles</#list></#assign>
<#assign threadCount>3</#assign>
"description": "<#include "modmail_thread_header_embed_description">"
}