mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 06:45:31 +02:00
Can do that
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user