mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
@@ -29,7 +29,12 @@ module.exports = class SauceNaoCommand extends Command {
|
||||
}
|
||||
|
||||
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.');
|
||||
const sauce = data[0];
|
||||
const embed = new MessageEmbed()
|
||||
|
||||
Reference in New Issue
Block a user