send instead of sendFile for buffers

This commit is contained in:
Daniel Odendahl Jr
2017-04-17 17:05:57 +00:00
parent e0feffd18e
commit c450350094
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ 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.sendFile(response.body);
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!');