Code Improvements

This commit is contained in:
Daniel Odendahl Jr
2017-04-17 21:57:35 +00:00
parent 45ba18bea9
commit 9dd0589de5
46 changed files with 73 additions and 209 deletions
+2 -3
View File
@@ -40,9 +40,8 @@ module.exports = class MapCommand extends Command {
try {
const response = await snekfetch
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${location}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
return message.channel.send({file: {attachment: response.body} });
}
catch (err) {
return message.channel.send({file: {attachment: response.body}});
} catch (err) {
return message.say(':x: Error! Something went wrong! Make sure you entered the location correctly!');
}
}