mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -42,12 +42,8 @@ module.exports = class NeopetCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { pet, mood }) {
|
async run(msg, { pet, mood }) {
|
||||||
try {
|
const petImg = await petImage(pet, { mood, size: 5 });
|
||||||
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` }] });
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user