From 125e70ce916b05bb52f928f457bd34b5be660478 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 3 Apr 2024 18:07:55 -0400 Subject: [PATCH] Fix --- commands/search/magic.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/search/magic.js b/commands/search/magic.js index 542da460..d4d97175 100644 --- a/commands/search/magic.js +++ b/commands/search/magic.js @@ -75,6 +75,7 @@ module.exports = class MagicCommand extends Command { const { body } = await request .get('https://api.scryfall.com/cards/search') .query({ q: `${query}${isFunny ? ' is:funny' : ''}` }); + if (body.status === 404) return null; return body.data[0]; } catch (err) { if (err.status === 404) return null;