From c29625bf49539a7143cd0efc6d3779c0084fe552 Mon Sep 17 00:00:00 2001 From: blakewenloe Date: Thu, 4 Jul 2019 14:57:36 -0400 Subject: [PATCH] added radar embed --- modules/getWeather.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/getWeather.js b/modules/getWeather.js index e6f0348..a282d43 100644 --- a/modules/getWeather.js +++ b/modules/getWeather.js @@ -47,9 +47,7 @@ function getWeather(callsign, message) { let rain_mn = data.entries[0].rain_mn || "Not available"; let luminosity = data.entries[0].luminosity || "Not available"; 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=${ - config.gmaps_token - }`; + let miniMapUrl = `http://www2.findu.com/cgi-bin/radar-find.cgi?call=${callsign}`; let locationEmbed = new Discord.RichEmbed() .setColor(config.embed_color) .setAuthor("APRS Bot") @@ -64,6 +62,7 @@ function getWeather(callsign, message) { .addField("Rainfall since midnight", `${rain_mn}mm`) .addField("Luminosity", luminosity) .addField("Time", timeUpdated.toLocaleString("en-US", dateOptions)) + .setImage(miniMapUrl) .setTimestamp() .setFooter("Data sourced from https://aprs.fi/"); message.channel.send({ embed: locationEmbed });