Update neopet-image-finder

This commit is contained in:
Dragon Fire
2018-09-02 16:19:14 -04:00
parent 755b4212a2
commit e122ea59b9
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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!`);
}
+2 -2
View File
@@ -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"
},