diff --git a/commands/avatar-edit/3000-years.js b/commands/avatar-edit/3000-years.js index 8d26f133..8cd5cd4b 100644 --- a/commands/avatar-edit/3000-years.js +++ b/commands/avatar-edit/3000-years.js @@ -41,10 +41,7 @@ module.exports = class YearsCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 461, 127, 200, 200); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: '3000-years.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/approved.js b/commands/avatar-edit/approved.js index 929e4186..271c97d5 100644 --- a/commands/avatar-edit/approved.js +++ b/commands/avatar-edit/approved.js @@ -41,10 +41,7 @@ module.exports = class ApprovedCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(avatar, 0, 0); ctx.drawImage(base, 0, 0, avatar.width, avatar.height); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'approved.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/avatar-fusion.js b/commands/avatar-edit/avatar-fusion.js index 8d880a17..b6314bc2 100644 --- a/commands/avatar-edit/avatar-fusion.js +++ b/commands/avatar-edit/avatar-fusion.js @@ -51,10 +51,7 @@ module.exports = class AvatarFusionCommand extends Command { ctx.globalAlpha = 0.5; ctx.drawImage(baseAvatar, 0, 0); ctx.drawImage(overlayAvatar, 0, 0, baseAvatar.width, baseAvatar.height); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'avatar-fusion.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'avatar-fusion.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/beautiful.js b/commands/avatar-edit/beautiful.js index 3821ab5f..6ef0b5bb 100644 --- a/commands/avatar-edit/beautiful.js +++ b/commands/avatar-edit/beautiful.js @@ -42,10 +42,7 @@ module.exports = class BeautifulCommand extends Command { ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 341, 35, 117, 135); ctx.drawImage(avatar, 343, 301, 117, 135); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'beautiful.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/bob-ross.js b/commands/avatar-edit/bob-ross.js index 4a198be4..62dce0c4 100644 --- a/commands/avatar-edit/bob-ross.js +++ b/commands/avatar-edit/bob-ross.js @@ -45,10 +45,7 @@ module.exports = class BobRossCommand extends Command { ctx.drawImage(avatar, 69, 102, 256, 256); ctx.rotate(-3 * (Math.PI / 180)); ctx.drawImage(base, 0, 0); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'bob-ross.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/card.js b/commands/avatar-edit/card.js index e2030418..6afd408c 100644 --- a/commands/avatar-edit/card.js +++ b/commands/avatar-edit/card.js @@ -63,10 +63,7 @@ module.exports = class CardCommand extends Command { ctx.font = '14px Noto'; ctx.fillText(user.id, 30, 355); ctx.fillText(`#${user.discriminator}`, 313, 355); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'card.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/challenger.js b/commands/avatar-edit/challenger.js index 860c962c..95d42ec2 100644 --- a/commands/avatar-edit/challenger.js +++ b/commands/avatar-edit/challenger.js @@ -41,10 +41,7 @@ module.exports = class ChallengerCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 484, 98, 256, 256); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'challenger.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/christmas-hat.js b/commands/avatar-edit/christmas-hat.js index ffdf3231..fd5fa878 100644 --- a/commands/avatar-edit/christmas-hat.js +++ b/commands/avatar-edit/christmas-hat.js @@ -40,10 +40,7 @@ module.exports = class ChristmasHatCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(avatar, 0, 0); ctx.drawImage(base, 0, 0, avatar.width, avatar.height); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'christmas-hat.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'christmas-hat.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/dexter.js b/commands/avatar-edit/dexter.js index b153f7b4..7f4048d0 100644 --- a/commands/avatar-edit/dexter.js +++ b/commands/avatar-edit/dexter.js @@ -42,10 +42,7 @@ module.exports = class DexterCommand extends Command { ctx.rotate(-11 * (Math.PI / 180)); ctx.drawImage(avatar, 234, 274, 225, 225); ctx.rotate(11 * (Math.PI / 180)); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'dexter.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/food-broke.js b/commands/avatar-edit/food-broke.js index fc7bf9ea..ff6461dd 100644 --- a/commands/avatar-edit/food-broke.js +++ b/commands/avatar-edit/food-broke.js @@ -42,10 +42,7 @@ module.exports = class FoodBrokeCommand extends Command { ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 23, 9, 125, 125); ctx.drawImage(avatar, 117, 382, 75, 75); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'food-broke.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'food-broke.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/greyscale.js b/commands/avatar-edit/greyscale.js index 93a74000..abfb0c9f 100644 --- a/commands/avatar-edit/greyscale.js +++ b/commands/avatar-edit/greyscale.js @@ -47,10 +47,7 @@ module.exports = class GreyscaleCommand extends Command { data[i + 2] = brightness; } ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'greyscale.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/he-lives-in-you.js b/commands/avatar-edit/he-lives-in-you.js index c48d88bd..841c7b68 100644 --- a/commands/avatar-edit/he-lives-in-you.js +++ b/commands/avatar-edit/he-lives-in-you.js @@ -43,10 +43,7 @@ module.exports = class HeLivesInYouCommand extends Command { ctx.rotate(-24 * (Math.PI / 180)); ctx.drawImage(avatar, 75, 160, 130, 150); ctx.rotate(24 * (Math.PI / 180)); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'he-lives-in-you.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'he-lives-in-you.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/i-have-the-power.js b/commands/avatar-edit/i-have-the-power.js index 995d9d7b..923a9a56 100644 --- a/commands/avatar-edit/i-have-the-power.js +++ b/commands/avatar-edit/i-have-the-power.js @@ -43,10 +43,7 @@ module.exports = class IHaveThePowerCommand extends Command { ctx.rotate(18.3 * (Math.PI / 180)); ctx.drawImage(avatar, 332, -125, 175, 175); ctx.rotate(-18.3 * (Math.PI / 180)); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'i-have-the-power.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'i-have-the-power.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/invert.js b/commands/avatar-edit/invert.js index 4722d7af..b14b3267 100644 --- a/commands/avatar-edit/invert.js +++ b/commands/avatar-edit/invert.js @@ -45,10 +45,7 @@ module.exports = class InvertCommand extends Command { data[i + 2] = 255 - data[i + 2]; } ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'invert.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/look-at-this-photograph.js b/commands/avatar-edit/look-at-this-photograph.js index a220f559..2cb18cc5 100644 --- a/commands/avatar-edit/look-at-this-photograph.js +++ b/commands/avatar-edit/look-at-this-photograph.js @@ -43,10 +43,7 @@ module.exports = class LookAtThisPhotographCommand extends Command { ctx.rotate(-13.5 * (Math.PI / 180)); ctx.drawImage(avatar, 280, 218, 175, 125); ctx.rotate(13.5 * (Math.PI / 180)); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'look-at-this-photograph.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'look-at-this-photograph.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/photograph.js b/commands/avatar-edit/photograph.js index 9ff97b8a..03866991 100644 --- a/commands/avatar-edit/photograph.js +++ b/commands/avatar-edit/photograph.js @@ -42,10 +42,7 @@ module.exports = class PhotographCommand extends Command { ctx.rotate(-8.21 * (Math.PI / 180)); ctx.drawImage(avatar, 85, 116, 150, 150); ctx.rotate(8.21 * (Math.PI / 180)); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'photograph.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'photograph.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/pixelize.js b/commands/avatar-edit/pixelize.js index 0b932ff1..8cc3c843 100644 --- a/commands/avatar-edit/pixelize.js +++ b/commands/avatar-edit/pixelize.js @@ -38,10 +38,7 @@ module.exports = class PixelizeCommand extends Command { const ctx = canvas.getContext('2d'); ctx.imageSmoothingEnabled = false; ctx.drawImage(avatar, 0, 0, 512, 512); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'pixelize.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pixelize.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/rainbow.js b/commands/avatar-edit/rainbow.js index 6ab02a25..27166c01 100644 --- a/commands/avatar-edit/rainbow.js +++ b/commands/avatar-edit/rainbow.js @@ -41,10 +41,7 @@ module.exports = class RainbowCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(avatar, 0, 0); ctx.drawImage(base, 0, 0, avatar.width, avatar.height); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'rainbow.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rainbow.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/rejected.js b/commands/avatar-edit/rejected.js index d7c83670..88f14b4a 100644 --- a/commands/avatar-edit/rejected.js +++ b/commands/avatar-edit/rejected.js @@ -41,10 +41,7 @@ module.exports = class RejctedCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(avatar, 0, 0); ctx.drawImage(base, 0, 0, avatar.width, avatar.height); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'rejected.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/rip.js b/commands/avatar-edit/rip.js index a17aa9da..2d6450ae 100644 --- a/commands/avatar-edit/rip.js +++ b/commands/avatar-edit/rip.js @@ -50,10 +50,7 @@ module.exports = class RIPCommand extends Command { data[i + 2] = brightness; } ctx.putImageData(imgData, 158, 51); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'rip.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/steam-card.js b/commands/avatar-edit/steam-card.js index 640bbd3b..507c69af 100644 --- a/commands/avatar-edit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -49,10 +49,7 @@ module.exports = class SteamCardCommand extends Command { ctx.drawImage(base, 0, 0); ctx.font = '30px Noto'; ctx.fillText(member.displayName, 35, 48); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'steam-card.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/steam-now-playing.js b/commands/avatar-edit/steam-now-playing.js index 1d0de3d6..a2974a70 100644 --- a/commands/avatar-edit/steam-now-playing.js +++ b/commands/avatar-edit/steam-now-playing.js @@ -57,10 +57,7 @@ module.exports = class SteamNowPlayingCommand extends Command { if (ctx.measureText(game).width > 160) shorten = true; while (ctx.measureText(game).width > 160) game = game.substr(0, game.length - 1); ctx.fillText(shorten ? `${game}...` : game, 63, 54); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'steam-now-playing.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-now-playing.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/thug-life.js b/commands/avatar-edit/thug-life.js index 0e07399f..2ea19a15 100644 --- a/commands/avatar-edit/thug-life.js +++ b/commands/avatar-edit/thug-life.js @@ -49,10 +49,7 @@ module.exports = class ThugLifeCommand extends Command { data[i + 2] = brightness; } ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'thug-life.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/triggered.js b/commands/avatar-edit/triggered.js index 6aedc92a..1ac63dcc 100644 --- a/commands/avatar-edit/triggered.js +++ b/commands/avatar-edit/triggered.js @@ -46,10 +46,7 @@ module.exports = class TriggeredCommand extends Command { for (let i = 0; i < data.length; i += 4) data[i] = Math.max(255, data[i]); ctx.putImageData(imgData, 0, 0); ctx.drawImage(base, 0, 0); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'triggered.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/wanted.js b/commands/avatar-edit/wanted.js index 385c641c..e062a8ec 100644 --- a/commands/avatar-edit/wanted.js +++ b/commands/avatar-edit/wanted.js @@ -41,10 +41,7 @@ module.exports = class WantedCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 150, 360, 430, 430); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'wanted.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/avatar-edit/yu-gi-oh-token.js b/commands/avatar-edit/yu-gi-oh-token.js index ea3ecbb7..028f9dd3 100644 --- a/commands/avatar-edit/yu-gi-oh-token.js +++ b/commands/avatar-edit/yu-gi-oh-token.js @@ -41,10 +41,7 @@ module.exports = class YuGiOhTokenCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); ctx.drawImage(avatar, 45, 102, 293, 294); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'yu-gi-oh-token.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'yu-gi-oh-token.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 25c11c36..713b16bc 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const { MessageEmbed } = require('discord.js') +const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); const { filterPkmn } = require('../../structures/Util'); diff --git a/commands/image-edit/achievement.js b/commands/image-edit/achievement.js index 28f03a75..a73ead1d 100644 --- a/commands/image-edit/achievement.js +++ b/commands/image-edit/achievement.js @@ -33,10 +33,7 @@ module.exports = class AchievementCommand extends Command { h: 'Achievement Get!', t: text }); - return msg.say({ files: [{ - attachment: body, - name: 'achievement.png' - }] }); + return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/image-edit/be-like-bill.js b/commands/image-edit/be-like-bill.js index efcf8047..26949393 100644 --- a/commands/image-edit/be-like-bill.js +++ b/commands/image-edit/be-like-bill.js @@ -46,10 +46,7 @@ module.exports = class BeLikeBillCommand extends Command { Be like ${name}. `; ctx.fillText(text, 31, 80); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'be-like-bill.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'be-like-bill.png' }] }); } }; diff --git a/commands/image-edit/color.js b/commands/image-edit/color.js index 95839467..2707e199 100644 --- a/commands/image-edit/color.js +++ b/commands/image-edit/color.js @@ -30,9 +30,6 @@ module.exports = class ColorCommand extends Command { const ctx = canvas.getContext('2d'); ctx.fillStyle = color; ctx.fillRect(0, 0, 250, 250); - return msg.say({ files: [{ - attachment: canvas.toBuffer(), - name: 'color.png' - }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'color.png' }] }); } }; diff --git a/commands/image-edit/meme.js b/commands/image-edit/meme.js index 3cb7c55a..dbc8248c 100644 --- a/commands/image-edit/meme.js +++ b/commands/image-edit/meme.js @@ -45,10 +45,7 @@ module.exports = class MemeCommand extends Command { const search = await snekfetch.get(`https://memegen.link/api/search/${type}`); if (!search.body.length) return msg.say('Could not find any results.'); const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`)); - return msg.say({ files: [{ - attachment: body, - name: 'meme.jpg' - }] }); + return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/image-edit/robohash.js b/commands/image-edit/robohash.js index 7c8977d1..48e11ce6 100644 --- a/commands/image-edit/robohash.js +++ b/commands/image-edit/robohash.js @@ -23,10 +23,7 @@ module.exports = class RobohashCommand extends Command { async run(msg, { text }) { try { const { body } = await snekfetch.get(`https://robohash.org/${text}`); - return msg.say({ files: [{ - attachment: body, - name: 'robohash.png' - }] }); + return msg.say({ files: [{ attachment: body, name: 'robohash.png' }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/other/avatar.js b/commands/other/avatar.js index bce54017..6334a35e 100644 --- a/commands/other/avatar.js +++ b/commands/other/avatar.js @@ -31,10 +31,7 @@ module.exports = class AvatarCommand extends Command { }); try { const { body } = await snekfetch.get(avatarURL); - return msg.say({ files: [{ - attachment: body, - name: `avatar.${format}` - }] }); + return msg.say({ files: [{ attachment: body, name: `avatar.${format}` }] }); } catch (err) { return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/commands/search/map.js b/commands/search/map.js index d63f1a47..2ab7950a 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -41,10 +41,8 @@ module.exports = class MapCommand extends Command { size: '500x500', key: GOOGLE_KEY }); - return msg.say(``, { 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!`); }