diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 68284f78..0237dca8 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -40,9 +40,9 @@ module.exports = class NeopetCommand extends Command { async run(msg, { pet, mood }) { try { - const link = await petImage(pet, { mood: moods[mood] }); - if (!link) return msg.say('Could not find any results.'); - return msg.say(link); + const data = await petImage(pet, { mood: moods[mood] }); + if (!data) return msg.say('Could not find any results.'); + return msg.say({ files: [{ attachment: data.data, name: `${pet}.png` }] }); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/package.json b/package.json index f0756817..8d6b71e7 100644 --- a/package.json +++ b/package.json @@ -42,14 +42,14 @@ "dotenv": "^6.0.0", "erlpack": "github:discordapp/erlpack", "mathjs": "^5.1.1", - "neopet-image-finder": "^4.0.1", + "neopet-image-finder": "^5.0.0", "node-opus": "^0.3.0", "node-superfetch": "^0.1.4", "random-js": "^1.0.8", "zlib-sync": "^0.1.4" }, "devDependencies": { - "eslint": "^5.4.0", + "eslint": "^5.5.0", "eslint-config-amber": "^1.1.0", "eslint-plugin-json": "^1.2.1" },