mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Code Improvements
This commit is contained in:
@@ -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!');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user