This commit is contained in:
Daniel Odendahl Jr
2017-10-13 17:49:26 +00:00
parent a673fb43fa
commit b57e817988
34 changed files with 35 additions and 133 deletions
+2 -4
View File
@@ -41,10 +41,8 @@ module.exports = class MapCommand extends Command {
size: '500x500',
key: GOOGLE_KEY
});
return msg.say(`<https://www.google.com/maps/search/${encodeURIComponent(query)}>`, { files: [{
attachment: body,
name: 'map.png'
}] });
const url = `https://www.google.com/maps/search/${encodeURIComponent(query)}`;
return msg.say(`<${url}>`, { files: [{ attachment: body, name: 'map.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}