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!`);
}