From 8e00871372e9070f0459ab69a8a7f8bafabc1e32 Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Sat, 4 Oct 2025 19:59:00 -0400 Subject: [PATCH] Fix --- commands/search/neopet.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 56cb954e..686a3142 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -42,12 +42,8 @@ module.exports = class NeopetCommand extends Command { } async run(msg, { pet, mood }) { - try { - const petImg = await petImage(pet, { mood, size: 5 }); - 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; - } + 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` }] }); } };