introduced color templates to manage the colors in a central way

created member author macro
created full member info macro
created member name macro
replaced some missed places with translation templates
made some templates for translation easier
This commit is contained in:
Sheldan
2020-08-16 12:38:32 +02:00
parent 8a33ff6099
commit a78bc99933
87 changed files with 202 additions and 388 deletions

View File

@@ -0,0 +1 @@
<#macro full_member_info member><@member_user_name member=member/> ${member.asMention?js_string} (${member.idLong?c})</#macro>

View File

@@ -0,0 +1 @@
<#macro member_author member> "author": { "name": "<@member_user_name member=member/>", "avatar": "${member.user.effectiveAvatarUrl}" }</#macro>

View File

@@ -0,0 +1 @@
<#macro member_user_name member>${member.effectiveName?js_string}#${member.user.discriminator}</#macro>

View File

@@ -0,0 +1,5 @@
"color" : {
"r": 31,
"g": 35,
"b": 122
}

View File

@@ -0,0 +1,5 @@
"color" : {
"r": 220,
"g": 20,
"b": 60
}

View File

@@ -0,0 +1,5 @@
"color" : {
"r": 6,
"g": 145,
"b": 34
}

View File

@@ -0,0 +1,5 @@
"color" : {
"r": 217,
"g": 143,
"b": 50
}

View File

@@ -2,11 +2,7 @@
"title": {
"title": "<@safe_include "features_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "abstracto_color">,
"description": "
<#list features as feature>
${feature.featureFlag.enabled?string('✅', '❌')} **<@safe_include "${feature.featureConfig.feature.key}_feature"/>** <@safe_include "feature_embed_key"/>: `${feature.featureConfig.feature.key}`

View File

@@ -2,11 +2,7 @@
"title": {
"title": "<@safe_include "help_command_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "abstracto_color">,
"description": "<@safe_include "help_command_embed_command_name"/>: **${command.name?js_string}**
<@safe_include "help_command_embed_command_description"/>: <#if command.templated> <@safe_include "${command.name}_description"/> <#else> ${command.description?js_string} </#if>

View File

@@ -1,15 +1,11 @@
{
<#assign name>${module.moduleInterface.info.name}</#assign>
"title": {
<#assign name=module.moduleInterface.info.name/>
"title": "<@safe_include "help_module_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "abstracto_color">,
"description": "
<@safe_include "help_module_embed_module_name"/>: **${module.moduleInterface.info.name?js_string}**
<@safe_include "help_module_embed_module_name"/>: **${name?js_string}**
<@safe_include "help_module_embed_module_description"/>: ${module.moduleInterface.info.description?js_string}
<@safe_include "help_module_embed_commands"/>:
<#list module.commands as command>`${command.configuration.name?js_string}`<#sep>, </#list>

View File

@@ -2,11 +2,7 @@
"title": {
"title": "<@safe_include "help_modules_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "abstracto_color">,
"description": "
<#list modules as module><#assign module=module/>
<@safe_include "help_module_embed_module_name"/>: **${module.info.name?js_string}**

View File

@@ -2,11 +2,7 @@
"title": {
"title": "<@safe_include "listChannelGroups_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "success_color">,
<#if groups?size = 0>
"description": "<@safe_include "listChannelGroups_no_channel_group"/>",
</#if>

View File

@@ -1 +1 @@
<#include "posttarget_invalid_post_target_response"> <#include "posttarget_no_target">
<#include "posttarget_invalid_post_target_response"> <#include "posttarget_invalid_target">

View File

@@ -2,11 +2,7 @@
"title": {
"title": "<@safe_include "posttarget_embed_title"/>"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "success_color">,
"description": "
<#list postTargets as postTarget><#assign postTarget=postTarget/>
<#assign postTargetName>${postTarget.postTarget.name?js_string}</#assign>

View File

@@ -1,13 +1,7 @@
{
"author": {
"name": "${user.member.effectiveName?js_string}",
"avatar": "${user.member.user.effectiveAvatarUrl?js_string}"
},
"color" : {
"r": 200,
"g": 0,
"b": 255
},
<#include "member_author">
<@member_author member=user.member/>,
<#include "exception_color">,
"preventEmptyEmbed": "true",
<#if template?has_content>
<#if template.templateModel?has_content>