$(weather)
- Syntax
$(weather "<location>")- Arguments
- Required
The $(weather) variable displays current weather conditions for a location: temperature, feels-like temperature, conditions, wind, humidity, visibility, and air pressure.
Use it
Section titled “Use it”!command add !weather $(weather ${1:})Output
Section titled “Output”The output follows this fixed format — a 🌞 (day) or 🌜 (night) symbol, temperatures in both units, the condition, wind, humidity, visibility, and air pressure:
<City>, <Country>: 🌞 21.0 °C (69.8 °F). Feels like 20.4 °C (68.7 °F). Partly cloudy. Wind is blowing from the Northwest at 10.1 km/h (6.3 mp/h). 50% humidity. Visibility: 10 km (6 miles). Air pressure: 1013 hPa.Examples
Section titled “Examples”Getting weather for New York City
$(weather "New York, NY")Getting weather for London, UK
$(weather "London, UK")Parameters
Section titled “Parameters”The $(weather) variable accepts one parameter:
location: The location for which you want to retrieve weather information. Format as “City, State” for US locations or “City, Country” for international locations.
Q: How often is the weather data updated?
A: The bot requests fresh data from its weather provider every time the variable runs. How current that data is depends on the provider, not on the bot.
Q: Can I display the temperature in Fahrenheit instead of Celsius?
A: The variable automatically displays both Celsius and Fahrenheit temperatures.
Q: What happens if I enter an invalid location?
A: If the weather service can’t find the location or the request fails, the variable outputs Failed to get weather data. If the service responds with malformed data, the output is Failed to decode weather data.