mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Pet Image Error Handling Improvement
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = class NeopetCommand extends Command {
|
|||||||
});
|
});
|
||||||
const $ = cheerio.load(response.text);
|
const $ = cheerio.load(response.text);
|
||||||
const link = $('textarea').first().text();
|
const link = $('textarea').first().text();
|
||||||
if (!link) return message.say(':x: Error! Pet not found!');
|
if (!link.includes('cp')) return message.say(':x: Error! Pet not found!');
|
||||||
return message.say(link);
|
return message.say(link);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user