diff --git a/commands/interaction/slash/utils/weather.js b/commands/interaction/slash/utils/weather.js index cd63dd5..dac9be2 100644 --- a/commands/interaction/slash/utils/weather.js +++ b/commands/interaction/slash/utils/weather.js @@ -38,7 +38,7 @@ function renderWeatherCard(context, data, units){ if(data.result.warnings.length >= 1){ for(const w of data.result.warnings.splice(0, 1)){ if(description.includes(stringwrap(w.label, 50))) continue; - description += `\n\n${icon("warning")} **${stringwrap(w.label, 50)}**\n-# ${stringwrap(w.source, 50)} • ${link(w.url, "Learn More", "Learn more about this alert")}` + description += `\n\n${icon("weather_warning_" + (w.icon || "generic").toLowerCase())} **${stringwrap(w.label, 50)}**\n-# ${stringwrap(w.source, 50)} • ${link(w.url, "Learn More", "Learn more about this alert")}` } } diff --git a/commands/message/utils/weather.js b/commands/message/utils/weather.js index f23f0a2..6be92fc 100644 --- a/commands/message/utils/weather.js +++ b/commands/message/utils/weather.js @@ -38,7 +38,7 @@ function renderWeatherCard(context, data, units){ if(data.result.warnings.length >= 1){ for(const w of data.result.warnings.splice(0, 1)){ if(description.includes(stringwrap(w.label, 50))) continue; - description += `\n\n${icon("warning")} **${stringwrap(w.label, 50)}**\n-# ${stringwrap(w.source, 50)} • ${link(w.url, "Learn More", "Learn more about this alert")}` + description += `\n\n${icon("weather_warning_" + (w.icon || "generic").toLowerCase())} **${stringwrap(w.label, 50)}**\n-# ${stringwrap(w.source, 50)} • ${link(w.url, "Learn More", "Learn more about this alert")}` } } diff --git a/labscore/constants.js b/labscore/constants.js index a44c579..a9ef701 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -154,6 +154,7 @@ module.exports.ICONS = Object.freeze({ "exclaim_4": "<:ico_exclaim_4:1263588879307640883>", "question_large": "<:ico_question_large:1263589058999750787>", + // These icon names (weather_:conditionId) have to be synced with the server. "weather_blizzard": "<:ico_w_blizzard:1263583584850022460>", "weather_blowing_snow": "<:ico_w_blowing_snow:1263583671726903377>", "weather_clear_day": "<:ico_w_clear_day:1263583684158820383>", @@ -190,6 +191,15 @@ module.exports.ICONS = Object.freeze({ "weather_very_hot": "<:very_hot:1263588713838018652>", "weather_windy": "<:ico_w_windy_breezy:1263585171849084968>", + "weather_warning_generic": "<:ico_weather_warning:1269684384966119444>", + // These icon names (weather_warning_:warningId) have to be synced with the server. + "weather_warning_storm": "<:ico_weather_wind:1269680554140242066>", + "weather_warning_tropical_storm": "<:ico_weather_tropicalstorm:1269680544430428312>", + "weather_warning_tornado": "<:ico_weather_tornado:1269680535517794334>", + "weather_warning_heat": "<:ico_weather_heat:1269680524897681564>", + "weather_warning_frost": "<:ico_weather_frost:1269680515145797652>", + "weather_warning_flood": "<:ico_weather_flood:1269680505519865982>", + "information": "<:ico_information:1263590946226835510>", "question": "<:ico_question:1263590898906697800>", "warning": "<:ico_warning:1263590857072967832>",