mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-01-26 19:42:10 +00:00
[AB-349] refactoring templates to have the new multi embed structure
This commit is contained in:
@@ -1,31 +1,35 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"description": "${definition.definition?json_string}",
|
||||
"fields": [
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_author"/>",
|
||||
"value": "${definition.author?json_string}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_up_votes"/>",
|
||||
"value": "${definition.upvoteCount}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_downvotes"/>",
|
||||
"value": "${definition.downVoteCount}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_link"/>",
|
||||
"value": "[<@safe_include "urban_search_command_response_embed_field_value_jump"/>](${definition.url?json_string})",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_example"/>",
|
||||
"value": "${definition.example?json_string}"
|
||||
}
|
||||
],
|
||||
"timeStamp": "${definition.creationDate}"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"description": "${definition.definition?json_string}",
|
||||
"fields": [
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_author"/>",
|
||||
"value": "${definition.author?json_string}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_up_votes"/>",
|
||||
"value": "${definition.upvoteCount}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_downvotes"/>",
|
||||
"value": "${definition.downVoteCount}",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_link"/>",
|
||||
"value": "[<@safe_include "urban_search_command_response_embed_field_value_jump"/>](${definition.url?json_string})",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "urban_search_command_response_embed_field_title_example"/>",
|
||||
"value": "${definition.example?json_string}"
|
||||
}
|
||||
],
|
||||
"timeStamp": "${definition.creationDate}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,40 +1,44 @@
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"fields": [
|
||||
<#if video.views??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_views"/>",
|
||||
"value": "${video.views}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.likes?? || video.dislikes?? || video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.likes??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_likes"/>",
|
||||
"value": "${video.likes}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.dislikes?? || video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.dislikes??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_dislikes"/>",
|
||||
"value": "${video.dislikes}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.commentCount??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_comment_count"/>",
|
||||
"value": "${video.commentCount}",
|
||||
"inline": "true"
|
||||
}
|
||||
</#if>
|
||||
],
|
||||
"footer": {
|
||||
"text": "<@safe_include "youtube_search_command_response_embed_footer"/>"
|
||||
},
|
||||
"timeStamp": "${video.publishedAt}"
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"fields": [
|
||||
<#if video.views??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_views"/>",
|
||||
"value": "${video.views}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.likes?? || video.dislikes?? || video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.likes??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_likes"/>",
|
||||
"value": "${video.likes}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.dislikes?? || video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.dislikes??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_dislikes"/>",
|
||||
"value": "${video.dislikes}",
|
||||
"inline": "true"
|
||||
}
|
||||
<#if video.commentCount??>,</#if>
|
||||
</#if>
|
||||
<#if video.commentCount??>
|
||||
{
|
||||
"name": "<@safe_include "youtube_search_command_response_embed_field_title_comment_count"/>",
|
||||
"value": "${video.commentCount}",
|
||||
"inline": "true"
|
||||
}
|
||||
</#if>
|
||||
],
|
||||
"footer": {
|
||||
"text": "<@safe_include "youtube_search_command_response_embed_footer"/>"
|
||||
},
|
||||
"timeStamp": "${video.publishedAt}"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user