From 9749f400c87e42a012b8c4a3379be1b82b25dddf Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Sun, 20 Jul 2025 01:03:54 -0400 Subject: [PATCH] Fix neopets images --- commands/search/neopet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 055050a1..07b17dfc 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -43,7 +43,9 @@ module.exports = class NeopetCommand extends Command { async run(msg, { pet, mood }) { try { - const { body } = await request.get(`http://pets.neopets.com/cpn/${encodeURIComponent(pet)}/${mood}/5.png`); + const { body } = await request + .get(`http://pets.neopets.com/cpn/${encodeURIComponent(pet)}/${mood}/5.png`) + .set({ 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0' }); return msg.say({ files: [{ attachment: body, name: `${pet}-${mood}.png` }] }); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.');