mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Fix
This commit is contained in:
@@ -29,7 +29,12 @@ module.exports = class SauceNaoCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { image }) {
|
async run(msg, { image }) {
|
||||||
const data = await sagiriClient(image);
|
let data;
|
||||||
|
try {
|
||||||
|
data = await sagiriClient(image);
|
||||||
|
} catch {
|
||||||
|
return msg.reply('No results for this image.');
|
||||||
|
}
|
||||||
if (!data.length) return msg.reply('No results for this image.');
|
if (!data.length) return msg.reply('No results for this image.');
|
||||||
const sauce = data[0];
|
const sauce = data[0];
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
|
|||||||
Reference in New Issue
Block a user