mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-01-29 17:02:31 +00:00
[AB-89] adding templates for weather command feature
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"color" : {
|
||||
"r": ${embedColor.red},
|
||||
"g": ${embedColor.green},
|
||||
"b": ${embedColor.blue}
|
||||
},
|
||||
<#assign weatherMap = { "Rain": "🌧️", "Clouds": "☁️", "Mist": "🌁", "Fog": "🌫️", "Sand": "⏳", "Dust": "⏳", "Thunderstorm": "⛈️", "Snow": "🌨️", "Clear": "☀️"}>
|
||||
<#assign locationName=locationName>
|
||||
<#assign countryKey=countryKey>
|
||||
<#assign weatherIcon>${weatherMap[mainWeather]!""}</#assign>
|
||||
<#assign weatherKey=mainWeather!"">
|
||||
<#assign weatherDescription=description!"">
|
||||
"description": "<@safe_include "openWeatherMap_command_response_description"/>",
|
||||
"fields": [
|
||||
<#if temperature??>
|
||||
{
|
||||
<#assign displayTemperaturRange=maxTemperature!=minTemperature>
|
||||
"name": "<@safe_include "openWeatherMap_command_response_field_temperature_field_title"/>",
|
||||
"value": "<@safe_include "openWeatherMap_command_response_field_temperature_field_value"/>",
|
||||
"inline": "true"
|
||||
},
|
||||
{
|
||||
"name": "<@safe_include "openWeatherMap_command_response_field_temperature_feels_like_field_title"/>",
|
||||
"value": "${feelsLikeTemperature}°C",
|
||||
"inline": "true"
|
||||
}
|
||||
</#if>
|
||||
<#if humidity??>
|
||||
<#if temperature??>,</#if>
|
||||
{
|
||||
"name": "<@safe_include "openWeatherMap_command_response_field_humidity_field_title"/>",
|
||||
"value": "${humidity}%",
|
||||
"inline": "true"
|
||||
}
|
||||
</#if>
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "no_weather_location_found_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
Shows the current weather for a given location
|
||||
@@ -0,0 +1,2 @@
|
||||
This command prints the current temperature and humidity of a given location
|
||||
It uses data from https://openweathermap.org
|
||||
@@ -0,0 +1 @@
|
||||
The name of the location you want to get the weather for
|
||||
@@ -0,0 +1 @@
|
||||
Weather in ${locationName}, ${countryKey}: ${weatherIcon} ${weatherKey} - ${weatherDescription}
|
||||
@@ -0,0 +1 @@
|
||||
Humidity
|
||||
@@ -0,0 +1 @@
|
||||
Feels like
|
||||
@@ -0,0 +1 @@
|
||||
Temperature
|
||||
@@ -0,0 +1 @@
|
||||
<#if temperature??>${temperature}°C</#if> <#if displayTemperaturRange>(${minTemperature}°C - ${maxTemperature}°C)</#if>
|
||||
@@ -0,0 +1 @@
|
||||
Openweathermap
|
||||
@@ -0,0 +1 @@
|
||||
Language key used to display the weather. Default: ${defaultValue}
|
||||
@@ -0,0 +1 @@
|
||||
Location not found.
|
||||
Reference in New Issue
Block a user