Can do that

This commit is contained in:
Daniel Odendahl Jr
2017-05-04 02:49:03 +00:00
parent 40d29e2297
commit 0ada2e43b4
+1 -1
View File
@@ -38,7 +38,7 @@ module.exports = class MapCommand extends Command {
try {
const { body } = await request
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${query}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
return msg.channel.send({ files: [{attachment: body}] })
return msg.channel.send({ files: [{ attachment: body, name: 'map.png' }] })
.catch(err => msg.say(`An Error Occurred: ${err}`));
} catch(err) {
return msg.say('An Error Occurred. The location may not have been found.');