v3.3.0-metars #14

Merged
voidf1sh merged 16 commits from v3.3.0-metars into main 2024-09-24 01:04:49 +00:00
Showing only changes of commit 66dbdceb2a - Show all commits

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` }