diff --git a/commands/search/magic.js b/commands/search/magic.js index d4d97175..9b8437b6 100644 --- a/commands/search/magic.js +++ b/commands/search/magic.js @@ -75,7 +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; + if (!body.data || !body.data.length || body.status === 404) return null; return body.data[0]; } catch (err) { if (err.status === 404) return null;