v3.3.0-metars #14
@ -393,7 +393,11 @@ const functions = {
|
|||||||
const interAltim = Math.round((metarData.altim * 0.2952998057228486) * 10)
|
const interAltim = Math.round((metarData.altim * 0.2952998057228486) * 10)
|
||||||
const altim = interAltim / 100;
|
const altim = interAltim / 100;
|
||||||
metarData.clouds.forEach(cloudLayer => {
|
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()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setAuthor({ name: `${metarData.name} [${metarData.icaoId}] METAR`, iconURL: "https://aviationweather.gov/img/icons/awc-logo-180.png"})
|
.setAuthor({ name: `${metarData.name} [${metarData.icaoId}] METAR`, iconURL: "https://aviationweather.gov/img/icons/awc-logo-180.png"})
|
||||||
|
Loading…
Reference in New Issue
Block a user