mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Fix
This commit is contained in:
@@ -75,7 +75,7 @@ module.exports = class MagicCommand extends Command {
|
|||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get('https://api.scryfall.com/cards/search')
|
.get('https://api.scryfall.com/cards/search')
|
||||||
.query({ q: `${query}${isFunny ? ' is:funny' : ''}` });
|
.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];
|
return body.data[0];
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.status === 404) return null;
|
if (err.status === 404) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user