forked from ChrisChrome/weather-bot
Update funcs.js
This commit is contained in:
parent
1001d80313
commit
70cce9e2ba
3
funcs.js
3
funcs.js
|
@ -88,6 +88,9 @@ const generateDiscordEmbeds = (forecastData, numOfDays) => {
|
|||
if (!numOfDays) numOfDays = 1;
|
||||
for (let i = 0; i < numOfDays; i++) {
|
||||
const period = forecastData.properties.periods[i];
|
||||
if (period.icon?.startsWith("/")) {
|
||||
period.icon = `https://api.weather.gov${period.icon}`
|
||||
}
|
||||
console.log(period.icon)
|
||||
const embed = {
|
||||
title: `${period.name} in ${forecastData.properties.relativeLocation.properties.city} ${forecastData.properties.relativeLocation.properties.state}`,
|
||||
|
|
Loading…
Reference in a new issue