[AB-349] refactoring templates to have the new multi embed structure

This commit is contained in:
Sheldan
2021-12-08 16:32:41 +01:00
parent c52dbbb1f3
commit 921a5259ee
112 changed files with 1937 additions and 1488 deletions

View File

@@ -1,64 +1,68 @@
<#include "format_instant">
{
"title": {
"title": "<#assign name=guild.name><@safe_include "serverinfo_embed_title"/>"
},
<#include "abstracto_color">,
"fields": [
{
"name": "<@safe_include "serverinfo_embed_id_field_title"/>",
"value": "${guild.id}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_owner_field_title"/>",
"value": "<@member_user_name member=guild.owner/>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_members_field_title"/>",
"value": "${guild.memberCount}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_role_count_field_title"/>",
"value": "${guild.roles?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_created_field_title"/>",
"value": "<@format_instant_date_time instant=timeCreated/>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_text_channel_count_field_title"/>",
"value": "${guild.textChannels?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_voice_channel_count_field_title"/>",
"value": "${guild.voiceChannels?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_emote_count_title"/>",
"value": "${guild.emotes?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_static_emotes_title"/>",
"value": "<#list staticEmotes as emote>${emote.markDown}<#sep> <#else><@safe_include "serverinfo_embed_emotes_no_emotes"/></#list>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_animated_emotes_title"/>",
"value": "<#list animatedEmotes as emote>${emote.markDown}<#sep> <#else><@safe_include "serverinfo_embed_emotes_no_emotes"/></#list>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_features_field_title"/>",
"value": "<#list guild.features as feature>${feature}<#sep>, <#else><@safe_include "serverinfo_embed_features_no_features"/></#list>",
"inline": "true"
}
]
"embeds": [
{
"title": {
"title": "<#assign name=guild.name><@safe_include "serverinfo_embed_title"/>"
},
<#include "abstracto_color">,
"fields": [
{
"name": "<@safe_include "serverinfo_embed_id_field_title"/>",
"value": "${guild.id}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_owner_field_title"/>",
"value": "<@member_user_name member=guild.owner/>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_members_field_title"/>",
"value": "${guild.memberCount}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_role_count_field_title"/>",
"value": "${guild.roles?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_created_field_title"/>",
"value": "<@format_instant_date_time instant=timeCreated/>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_text_channel_count_field_title"/>",
"value": "${guild.textChannels?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_voice_channel_count_field_title"/>",
"value": "${guild.voiceChannels?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_emote_count_title"/>",
"value": "${guild.emotes?size}",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_static_emotes_title"/>",
"value": "<#list staticEmotes as emote>${emote.markDown}<#sep> <#else><@safe_include "serverinfo_embed_emotes_no_emotes"/></#list>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_animated_emotes_title"/>",
"value": "<#list animatedEmotes as emote>${emote.markDown}<#sep> <#else><@safe_include "serverinfo_embed_emotes_no_emotes"/></#list>",
"inline": "true"
},
{
"name": "<@safe_include "serverinfo_embed_features_field_title"/>",
"value": "<#list guild.features as feature>${feature}<#sep>, <#else><@safe_include "serverinfo_embed_features_no_features"/></#list>",
"inline": "true"
}
]
}
]
}

View File

@@ -1,18 +1,22 @@
{
<#include "member_author">
<@member_author member=memberInfo/>,
<#include "abstracto_color">,
"imageUrl": "${memberInfo.user.effectiveAvatarUrl}",
"fields": [
{
"name": "<@safe_include "showAvatar_response_embed_user_field_title"/>",
"value": "${memberInfo.user.name?json_string}#${memberInfo.user.discriminator}",
"inline": "true"
},
{
"name": "<@safe_include "showAvatar_response_embed_image_field_title"/>",
"value": "[<@safe_include "showAvatar_response_embed_image_field_value_display"/>](${memberInfo.user.effectiveAvatarUrl})",
"inline": "true"
}
]
"embeds": [
{
<#include "member_author">
<@member_author member=memberInfo/>,
<#include "abstracto_color">,
"imageUrl": "${memberInfo.user.effectiveAvatarUrl}",
"fields": [
{
"name": "<@safe_include "showAvatar_response_embed_user_field_title"/>",
"value": "${memberInfo.user.name?json_string}#${memberInfo.user.discriminator}",
"inline": "true"
},
{
"name": "<@safe_include "showAvatar_response_embed_image_field_title"/>",
"value": "[<@safe_include "showAvatar_response_embed_image_field_value_display"/>](${memberInfo.user.effectiveAvatarUrl})",
"inline": "true"
}
]
}
]
}

View File

@@ -1,16 +1,20 @@
{
<#include "abstracto_color">,
"imageUrl": "${emote.imageUrl}",
"fields": [
{
"name": "<@safe_include "showEmote_response_embed_emote_name_field_title"/>",
"value": "${emote.name}",
"inline": "true"
},
{
"name": "<@safe_include "showEmote_response_embed_emote_link_field_title"/>",
"value": "${emote.imageUrl}",
"inline": "true"
}
]
"embeds": [
{
<#include "abstracto_color">,
"imageUrl": "${emote.imageUrl}",
"fields": [
{
"name": "<@safe_include "showEmote_response_embed_emote_name_field_title"/>",
"value": "${emote.name}",
"inline": "true"
},
{
"name": "<@safe_include "showEmote_response_embed_emote_link_field_title"/>",
"value": "${emote.imageUrl}",
"inline": "true"
}
]
}
]
}

View File

@@ -1,44 +1,48 @@
<#include "format_instant">
{
<#include "member_author">
<@member_author member=memberInfo/>,
<#include "abstracto_color">,
"thumbnail": "${memberInfo.user.effectiveAvatarUrl}",
"fields": [
{
"name": "<@safe_include "userInfo_response_embed_id_field_title"/>",
"value": "${memberInfo.user.id}",
"inline": "true"
},
<#if memberInfo.nickname?has_content>
{
"name": "<@safe_include "userInfo_response_embed_nickname_field_title"/>",
"value": "${memberInfo.nickname?json_string}",
"inline": "true"
},
</#if>
{
"name": "<@safe_include "userInfo_response_embed_status_field_title"/>",
"value": "${memberInfo.onlineStatus.key}",
"inline": "true"
},
{
"name": "<@safe_include "userInfo_response_embed_joined_field_title"/>",
"value": "<@format_instant_date_time instant=joinDate/>",
"inline": "true"
},
{
"name": "<@safe_include "userInfo_response_embed_registered_field_title"/>",
"value": "<@format_instant_date_time instant=creationDate/>",
"inline": "true"
}
<#if memberInfo.activities?size gt 0>
,
{
"name": "<@safe_include "userInfo_response_embed_activity_field_title"/>",
"value": "<#list memberInfo.activities as activity>${activity.type?json_string}<#sep>, </#list>",
"inline": "true"
}
</#if>
]
"embeds": [
{
<#include "member_author">
<@member_author member=memberInfo/>,
<#include "abstracto_color">,
"thumbnail": "${memberInfo.user.effectiveAvatarUrl}",
"fields": [
{
"name": "<@safe_include "userInfo_response_embed_id_field_title"/>",
"value": "${memberInfo.user.id}",
"inline": "true"
},
<#if memberInfo.nickname?has_content>
{
"name": "<@safe_include "userInfo_response_embed_nickname_field_title"/>",
"value": "${memberInfo.nickname?json_string}",
"inline": "true"
},
</#if>
{
"name": "<@safe_include "userInfo_response_embed_status_field_title"/>",
"value": "${memberInfo.onlineStatus.key}",
"inline": "true"
},
{
"name": "<@safe_include "userInfo_response_embed_joined_field_title"/>",
"value": "<@format_instant_date_time instant=joinDate/>",
"inline": "true"
},
{
"name": "<@safe_include "userInfo_response_embed_registered_field_title"/>",
"value": "<@format_instant_date_time instant=creationDate/>",
"inline": "true"
}
<#if memberInfo.activities?size gt 0>
,
{
"name": "<@safe_include "userInfo_response_embed_activity_field_title"/>",
"value": "<#list memberInfo.activities as activity>${activity.type?json_string}<#sep>, </#list>",
"inline": "true"
}
</#if>
]
}
]
}