[AB-89] adding templates for weather command feature

This commit is contained in:
Sheldan
2023-03-17 01:53:52 +01:00
parent b6a2dd2da7
commit e05f774500
13 changed files with 54 additions and 0 deletions

View File

@@ -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>
]
}
]
}

View File

@@ -0,0 +1 @@
<#include "no_weather_location_found_exception_text">

View File

@@ -0,0 +1 @@
Shows the current weather for a given location

View File

@@ -0,0 +1,2 @@
This command prints the current temperature and humidity of a given location
It uses data from https://openweathermap.org

View File

@@ -0,0 +1 @@
The name of the location you want to get the weather for

View File

@@ -0,0 +1 @@
Weather in ${locationName}, ${countryKey}: ${weatherIcon} ${weatherKey} - ${weatherDescription}

View File

@@ -0,0 +1 @@
<#if temperature??>${temperature}°C</#if> <#if displayTemperaturRange>(${minTemperature}°C - ${maxTemperature}°C)</#if>

View File

@@ -0,0 +1 @@
Language key used to display the weather. Default: ${defaultValue}