[AB-xxx] updating user banned/unbanned notification log messages to include a potential reason for unbanning

updated user_detail template to handle userDetail
removing active logging of unban/ban commands
This commit is contained in:
Sheldan
2024-05-05 01:59:38 +02:00
parent 7333ddc03c
commit 193bfe3f75
17 changed files with 16 additions and 64 deletions

View File

@@ -1 +1 @@
<#macro user_detail user>${user.name?json_string}<#if user.discriminator?number gt 0>#${user.discriminator}</#if> (${user.idLong?c})</#macro>
<#macro user_detail user><#if user.name?has_content>${user.name?json_string}<#if user.discriminator?has_content && user.discriminator != '0000'>#${user.discriminator}</#if><#else>${user.userMention}</#if> (${user.id?c})</#macro>

View File

@@ -1,31 +0,0 @@
{
"embeds": [
{
"title": {
"title": "<@safe_include "ban_log_title"/>"
},
<#include "moderation_action_color">,
"fields": [
{
"name": "<@safe_include "ban_log_banned_user_field_title"/>",
"value": "${bannedUser.userMention}"
},
{
"name": "<@safe_include "ban_log_banning_user_field_title"/>",
"value": "${banningMember.memberMention}"
},
{
"name": "<@safe_include "ban_log_reason_field_title"/>",
"value": "${reason?json_string}"
}
<#if deletionDuration?has_content>
,
{
"name": "<@safe_include "ban_log_deletion_duration_field_title"/>",
"value": "${fmtDuration(deletionDuration)}"
}
</#if>
]
}
]
}

View File

@@ -1,20 +0,0 @@
{
"embeds": [
{
"title": {
"title": "<@safe_include "unBan_log_title"/>"
},
<#include "moderation_action_color">,
"fields": [
{
"name": "<@safe_include "unBan_log_un_banned_user_field_title"/>",
"value": "${bannedUser.userMention}"
},
{
"name": "<@safe_include "unBan_log_un_banning_user_field_title"/>",
"value": "${unBanningMember.memberMention}"
}
]
}
]
}

View File

@@ -1,7 +1,6 @@
{
"embeds": [
{
<#include "user_detail">
<#include "full_member_info">
<#include "moderation_action_color">,
<#assign newLevel=newLevel>

View File

@@ -3,8 +3,12 @@
{
<#include "user_detail">
<#include "abstracto_color">,
<#if bannedUser.name?has_content>
<#assign bannedUserName=bannedUser.name>
"description" : "<@safe_include "userBanned_description_with_name"/>",
<#else>
"description" : "<@safe_include "userBanned_description"/>",
</#if>
"fields": [
{
"name": "<@safe_include "userBanned_field_title_banned_user"/>",

View File

@@ -16,6 +16,13 @@
"value": "<@user_detail user=unBanningUser/>"
}
</#if>
<#if reason??>
,
{
"name": "<@safe_include "userUnBanned_field_title_reason"/>",
"value": "${reason}"
}
</#if>
]
}
]

View File

@@ -1 +1 @@
User ${bannedUserName} was banned.
User was banned.

View File

@@ -0,0 +1 @@
User ${bannedUserName} was banned.