mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-04-17 20:42:54 +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">
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
${meaning} <#if hasExample>*Example: ${example}*</#if>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Searches for definitions in a public English dictionary
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Searches for definitions on [Free Dictionary API](https://dictionaryapi.dev/).
|
||||||
|
This is limited to the English language.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The word to search for
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Dictionary
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
General failure when doing the Dictionary request.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
No definition found in the dictionary.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Searches for articles on Wikipedia
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Searches for articles on [Wikipedia](https://en.wikipedia.org/wiki/Main_Page).
|
||||||
|
The language of the article can be defined server-wide with the config key: `wikipediaLanguageKey` or with an optional parameter for the slash command.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The language to search in
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The name of the article to search for
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Visit
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Wikipedia
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
No Wikipedia article found.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
General failure when doing the Wikipedia request.
|
||||||
Reference in New Issue
Block a user