feat: Add weather command using weather.com API

This commit introduces a new command that allows users to check the weather forecast. The command retrieves weather data from the weather.com API and provides relevant information to users.

# Command:
/weather <city>

Example usage:
/weather New York

Technical details: Implementation of the weather command using the weather.com API in English.
This commit is contained in:
DaviDev 2024-09-08 21:17:15 +00:00
parent b6aa69edd2
commit bcbc6a07f3
3 changed files with 118 additions and 2 deletions

View file

@ -37,5 +37,9 @@
"lastFmStatusFor": "*Last.fm status for user* {lastfmUser}*:*\n\n*{nowPlaying}*: {trackName} by {artistName} \n\n*Number of plays*: {plays}",
"lastFmErr": "*Error retrieving data for Last.fm user* {lastfmUser}.",
"currentCommit": "*Current commit:* `{commitHash}`",
"errorRetrievingCommit": "*Error retrieving commit:* {error}"
"errorRetrievingCommit": "*Error retrieving commit:* {error}",
"provideLocation": "*Please provide a valid location.*",
"invalidLocation": "*Invalid location. Try again.*",
"weatherStatus": "*Weather in {addressFirst}:*\n\n*Status:* `{getStatusEmoji(iconCode)} {wxPhraseLong}`\n*Temperature:* `{temperature} °{temperatureUnit}`\n*Feels like:* `{temperatureFeelsLike} °{temperatureUnit2}`\n*Humidity:* `{relativeHumidity}%`\n*Wind speed:* `{windSpeed} {speedUnit}`",
"weatherErr": "*An error occurred while retrieving the weather. Please try again later.*\n\n`{error}`"
}

View file

@ -37,5 +37,10 @@
"lastFmStatusFor": "*Status do Last.fm para o usuário* {lastfmUser}*:*\n\n*{nowPlaying}*: {trackName} por {artistName}\n\n*Numero de plays*: {plays}",
"lastFmErr": "*Erro ao recuperar dados para o usuário do Last.fm* {lastfmUser}.",
"currentCommit": "*Commit atual:* `{commitHash}`",
"errorRetrievingCommit": "*Erro ao obter o commit:* {error}"
"errorRetrievingCommit": "*Erro ao obter o commit:* {error}",
"provideLocation": "*Por favor, forneça uma localização válida.*",
"invalidLocation": "*Localização inválida. Tente novamente.*",
"weatherStatus": "*Clima em {addressFirst}:*\n\n*Estado:* `{getStatusEmoji(iconCode)} {wxPhraseLong}`\n*Temperatura:* `{temperature} °{temperatureUnit}`\n*Sensação térmica:* `{temperatureFeelsLike} °{temperatureUnit2}`\n*Umidade:* `{relativeHumidity}%`\n*Velocidade do vento:* `{windSpeed} {speedUnit}`",
"weatherErr": "*Ocorreu um erro ao obter o clima. Tente novamente mais tarde.*\n\n`{error}`"
}