mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-01-26 19:42:10 +00:00
[AB-xxx] adding templates for wikipedia and dictionary feature
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"title": {
|
||||
"title": "${word?json_string}"
|
||||
},
|
||||
<#macro definitionDisplay definition>
|
||||
<#assign meaning=definition.definition>
|
||||
<#assign hasExample=definition.example?has_content>
|
||||
<#if hasExample>
|
||||
<#assign example=definition.example>
|
||||
</#if>
|
||||
<@safe_include "dictionaryDefinition_response_meaning_display"/>
|
||||
|
||||
|
||||
</#macro>
|
||||
"description": "<#list definitions as definition>${definition?index + 1}: <@definitionDisplay definition=definition /></#list>"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "dictionary_api_request_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "no_dictionary_api_definition_found_exception_text">
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
<#include "abstracto_color">,
|
||||
"title": {
|
||||
"title": "${title?json_string}"
|
||||
},
|
||||
"description": "${summary?json_string}"
|
||||
}
|
||||
],
|
||||
"buttons": [
|
||||
{
|
||||
"label": "<@safe_include "wikipediaArticleSummary_jump_link"/>",
|
||||
"url": "${fullURL?json_string}",
|
||||
"buttonStyle": "link",
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "no_wikipedia_article_found_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#include "wikipedia_request_exception_text">
|
||||
Reference in New Issue
Block a user