Minor tweaks

This commit is contained in:
Skylar Grant 2024-06-21 20:19:05 -04:00
parent 5a9b91ade1
commit 66dbdceb2a

View File

@ -394,19 +394,20 @@ const functions = {
const altim = interAltim / 100;
metarData.clouds.forEach(cloudLayer => {
if (cloudLayer.base !== null) {
clouds.push(`${cloudLayer.cover} @ ${cloudLayer.base}`);
clouds.push(`${cloudLayer.cover} @ ${cloudLayer.base}'`);
} else {
clouds.push(`${cloudLayer.cover}`);
}
});
const embed = new Discord.MessageEmbed()
.setAuthor({ name: `${metarData.name} [${metarData.icaoId}] METAR`, iconURL: "https://aviationweather.gov/img/icons/awc-logo-180.png"})
.setDescription(metarData.rawOb)
.setFooter({ text: "METAR by AviationWeather.gov" })
.setImage("https://media.discordapp.net/stickers/1175134632845516821.webp")
.setDescription(`**Not for real world use!**\n\n${metarData.rawOb}`)
.setFooter({ text: "METAR by AviationWeather.gov for CumbHub LLC" })
.addFields(
{ name: 'Observation Time', value: `${metarData.reportTime}Z` },
{ name: 'Temperature', value: `${metarData.temp}ºC/${metarData.dewp}ºC`},
{ name: 'Winds', value: `${metarData.wdir}@${metarData.wspd}${wgst} kts`},
{ name: 'Winds', value: `${metarData.wdir}º@${metarData.wspd}${wgst} kts`},
{ name: 'Visibility', value: `${metarData.visib} SM` },
{ name: 'Clouds', value: clouds.join('\n') },
{ name: 'Altimeter', value: `${altim} inHg` }