|
|
@ -47,9 +47,7 @@ function getWeather(callsign, message) {
|
|
|
|
let rain_mn = data.entries[0].rain_mn || "Not available";
|
|
|
|
let rain_mn = data.entries[0].rain_mn || "Not available";
|
|
|
|
let luminosity = data.entries[0].luminosity || "Not available";
|
|
|
|
let luminosity = data.entries[0].luminosity || "Not available";
|
|
|
|
timeUpdated = new Date(data.entries[0].time * 1000);
|
|
|
|
timeUpdated = new Date(data.entries[0].time * 1000);
|
|
|
|
miniMapUrl = `https://maps.googleapis.com/maps/api/staticmap?center=${coords}&zoom=13&size=600x300&maptype=roadmap&markers=color:blue|${coords}&key=${
|
|
|
|
let miniMapUrl = `http://www2.findu.com/cgi-bin/radar-find.cgi?call=${callsign}`;
|
|
|
|
config.gmaps_token
|
|
|
|
|
|
|
|
}`;
|
|
|
|
|
|
|
|
let locationEmbed = new Discord.RichEmbed()
|
|
|
|
let locationEmbed = new Discord.RichEmbed()
|
|
|
|
.setColor(config.embed_color)
|
|
|
|
.setColor(config.embed_color)
|
|
|
|
.setAuthor("APRS Bot")
|
|
|
|
.setAuthor("APRS Bot")
|
|
|
@ -64,6 +62,7 @@ function getWeather(callsign, message) {
|
|
|
|
.addField("Rainfall since midnight", `${rain_mn}mm`)
|
|
|
|
.addField("Rainfall since midnight", `${rain_mn}mm`)
|
|
|
|
.addField("Luminosity", luminosity)
|
|
|
|
.addField("Luminosity", luminosity)
|
|
|
|
.addField("Time", timeUpdated.toLocaleString("en-US", dateOptions))
|
|
|
|
.addField("Time", timeUpdated.toLocaleString("en-US", dateOptions))
|
|
|
|
|
|
|
|
.setImage(miniMapUrl)
|
|
|
|
.setTimestamp()
|
|
|
|
.setTimestamp()
|
|
|
|
.setFooter("Data sourced from https://aprs.fi/");
|
|
|
|
.setFooter("Data sourced from https://aprs.fi/");
|
|
|
|
message.channel.send({ embed: locationEmbed });
|
|
|
|
message.channel.send({ embed: locationEmbed });
|
|
|
|