diff --git a/commands/message/utils/weather.js b/commands/message/utils/weather.js index 325d7dd..c6fd062 100644 --- a/commands/message/utils/weather.js +++ b/commands/message/utils/weather.js @@ -27,7 +27,7 @@ module.exports = { data = data.response.body - let description = `### ${weatherIcon(data.result.current.condition.id.toLowerCase())} ​ ​ ​ ​ ${Math.floor(data.result.current.temperature.current)}°C • ${data.result.current.condition.label}\n\n${pill("Feels like")} ${smallPill(Math.floor(data.result.current.temperature.feels_like) + "°C")} ​ ​ ​ ​ ${pill("Wind")} ${smallPill(data.result.current.wind.speed + " km/h")}` + let description = `### ${weatherIcon(data.result.current.icon.id)} ​ ​ ​ ​ ${Math.floor(data.result.current.temperature.current)}°C • ${data.result.current.condition.label}\n\n${pill("Feels like")} ${smallPill(Math.floor(data.result.current.temperature.feels_like) + "°C")} ​ ​ ​ ​ ${pill("Wind")} ${smallPill(data.result.current.wind.speed + " km/h")}` let secondaryPills = []; if(data.result.current.humidity > 0) secondaryPills.push(`${pill("Humidity")} ${smallPill(Math.floor(data.result.current.humidity * 100) + "%")}`) @@ -40,7 +40,7 @@ module.exports = { // Render Forecasts description += `\n` for(const i of data.result.forecast){ - description += `\n${pill(i.day)} ​ ​ ${weatherIcon(i.condition.toLowerCase().replace(' ', '_'))}` + description += `\n${pill(i.day)} ​ ​ ${weatherIcon(i.icon)}` if(Math.floor(i.temperature.max).toString().length == 1) description += `${pill(Math.floor(i.temperature.max) + "°C ")}` else description += `${pill(Math.floor(i.temperature.max) + "°C")}` description += `​**/**​` @@ -57,7 +57,7 @@ module.exports = { e.footer.iconUrl = STATICS.weather if(data.result.location) e.footer.text = data.result.location //+ " • " + context.client.user.username - if(data.result.current.icon) e.thumbnail = { url: data.result.current.icon } + if(data.result.current.icon) e.thumbnail = { url: data.result.current.icon.url } if(data.result.current.image) e.image = { url: data.result.current.image } return editOrReply(context, e) diff --git a/labscore/constants.js b/labscore/constants.js index 9836339..efed58e 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -141,19 +141,41 @@ module.exports.ICONS = Object.freeze({ "exclaim_4": "<:ico_exclaim_4:1165263551586369609>", "question_large": "<:ico_question_large:1165263553050185950>", - "weather_clear": "<:ico_weather_clear_day:1167770009557286913>", - "weather_clear_night": "<:ico_weather_clear_night:1168183604409544714>", - "weather_cloudy": "<:ico_weather_cloudy:1167770011776073819>", - "weather_drizzle": "<:ico_weather_drizzle:1167770013747388437>", - "weather_flurries": "<:ico_weather_flurries:1167788306059247616>", - "weather_haze": "<:haze:1167770015957782548>", - "weather_mostlyclear": "<:ico_weather_mostly_clear_day:1167770017719398411>", - "weather_mostlycloudy": "<:ico_weather_mostly_cloudy_day:1167770019766214686>", - "weather_partlycloudy": "<:ico_weather_partly_cloudy_day:1167770022073094234>", - "weather_rain": "<:ico_weather_rain:1167770024761630741>", - "weather_snow": "<:ico_weather_snow:1167770027135606806>", - "weather_thunderstorms": "<:ico_weather_thunderstorms:1167770030063231117>", - "weather_windy": "<:ico_weather_windy:1167770031682232420>", + "weather_blizzard": "<:ico_w_blizzard:1181635044306067528>", + "weather_blowing_snow": "<:ico_w_blowing_snow:1181635045484662920>", + "weather_clear_day": "<:ico_w_clear_day:1181635047481163870>", + "weather_clear_night": "<:ico_w_clear_night:1181635048919801876>", + "weather_cloudy": "<:ico_w_cloudy:1181635050706583682>", + "weather_drizzle": "<:ico_w_drizzle:1181635052111675422>", + "weather_flurries": "<:ico_w_flurries:1181635053722284052>", + "weather_haze_fog_dust_smoke": "<:ico_w_haze_fog_dust_smoke:1181635055693611028>", + "weather_heavy_rain": "<:ico_w_heavy_rain:1181635056968675490>", + "weather_heavy_snow": "<:ico_w_heavy_snow:1181635057966907453>", + "weather_icy": "<:ico_w_icy:1181635095367528448>", + "weather_isolated_scattered_thunderstorms_day": "<:ico_w_iso_scattered_thunderstorm:1181635061905367171>", + "weather_isolated_scattered_thunderstorms_night": "<:ico_w_iso_scattered_thunderstorm:1181635061905367171>", + "weather_isolated_thunderstorms": "<:ico_w_isolated_thunderstorms:1181635125205798962>", + "weather_mixed_rain_hail_sleet": "<:ico_w_mixed_rain_hail_sleet:1181635126380212366>", + "weather_mixed_rain_snow": "<:ico_w_mixed_rain_snow:1181635129207173182>", + "weather_mostly_clear_day": "<:ico_w_clear_day:1181635047481163870>", + "weather_mostly_clear_night": "<:ico_w_clear_night:1181635048919801876>", + "weather_mostly_cloudy_day": "<:ico_w_mostly_cloudy_day:1181635156860223618>", + "weather_mostly_cloudy_night": "<:ico_w_mostly_cloudy_night:1181635158487613471>", + "weather_partly_cloudy_day": "<:ico_w_partly_cloudy_day:1181635160077246605>", + "weather_partly_cloudy_night": "<:ico_w_partly_cloudy_night:1181635162002444398>", + "weather_scattered_showers_day": "<:ico_w_scattered_showers_day:1181635163386560653>", + "weather_scattered_showers_night": "<:ico_w_scattered_showers_night:1181635164678406214>", + "weather_scattered_snow_showers_day": "<:ico_w_scattered_snow_showers_day:1181635186702692462>", + "weather_scattered_snow_showers_night": "<:ico_w_scatter_snow_showers_night:1181635188216832141>", + "weather_showers_rain": "<:ico_w_showers_rain:1181635189831630889>", + "weather_showers_snow": "<:ico_w_showers_snow:1181635191488381018>", + "weather_sleet_hail": "<:ico_w_sleet_hail:1181651073316950118>", + "weather_strong_thunderstorms": "<:ico_w_strong_thunderstorms:1181651091989999616>", + "weather_tornado": "<:ico_w_tornado:1181651094162640976>", + "weather_tropical_storm_hurricane": "<:ico_w_tropical_storm_hurricane:1181651095588704397>", + "weather_very_cold": "<:ico_w_very_cold:1181651097350316122>", + "weather_very_hot": "<:ico_w_very_hot:1181651099342610504>", + "weather_windy": "<:ico_w_windy:1181651100529594518>", "generativeai_text": "<:ico_generativeai_text:1175527265707233341>",