Fix cloud layer CLR
This commit is contained in:
parent
13553d7e5a
commit
5a9b91ade1
@ -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 => {
|
||||||
clouds.push(`${cloudLayer.cover} @ ${cloudLayer.base}`);
|
if (cloudLayer.base !== null) {
|
||||||
|
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