Compare commits

...

2 Commits

Author SHA1 Message Date
6700e36907 Make update script 2024-06-21 20:20:07 -04:00
66dbdceb2a Minor tweaks 2024-06-21 20:19:05 -04:00
2 changed files with 9 additions and 4 deletions

View File

@ -394,19 +394,20 @@ const functions = {
const altim = interAltim / 100; const altim = interAltim / 100;
metarData.clouds.forEach(cloudLayer => { metarData.clouds.forEach(cloudLayer => {
if (cloudLayer.base !== null) { if (cloudLayer.base !== null) {
clouds.push(`${cloudLayer.cover} @ ${cloudLayer.base}`); clouds.push(`${cloudLayer.cover} @ ${cloudLayer.base}'`);
} else { } else {
clouds.push(`${cloudLayer.cover}`); 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"})
.setDescription(metarData.rawOb) .setImage("https://media.discordapp.net/stickers/1175134632845516821.webp")
.setFooter({ text: "METAR by AviationWeather.gov" }) .setDescription(`**Not for real world use!**\n\n${metarData.rawOb}`)
.setFooter({ text: "METAR by AviationWeather.gov for CumbHub LLC" })
.addFields( .addFields(
{ name: 'Observation Time', value: `${metarData.reportTime}Z` }, { name: 'Observation Time', value: `${metarData.reportTime}Z` },
{ name: 'Temperature', value: `${metarData.temp}ºC/${metarData.dewp}ºC`}, { 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: 'Visibility', value: `${metarData.visib} SM` },
{ name: 'Clouds', value: clouds.join('\n') }, { name: 'Clouds', value: clouds.join('\n') },
{ name: 'Altimeter', value: `${altim} inHg` } { name: 'Altimeter', value: `${altim} inHg` }

4
update.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
git pull
docker build . -t v0idf1sh/nodbot
docker push v0idf1sh/nodbot