This commit is contained in:
lilyissillyyy
2025-10-04 19:59:00 -04:00
parent 86e389d2ad
commit 8e00871372
+3 -7
View File
@@ -42,12 +42,8 @@ module.exports = class NeopetCommand extends Command {
} }
async run(msg, { pet, mood }) { async run(msg, { pet, mood }) {
try { const petImg = await petImage(pet, { mood, size: 5 });
const petImg = await petImage(pet, { mood, size: 5 }); if (!petImg) return msg.say('Could not find any results.');
return msg.say({ files: [{ attachment: petImg.data, name: `${pet}-${mood}.png` }] }); return msg.say({ files: [{ attachment: petImg.data, name: `${pet}-${mood}.png` }] });
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
throw err;
}
} }
}; };