This commit is contained in:
Dragon Fire
2024-03-30 18:59:44 -04:00
parent 26cdcf412d
commit dccb833e36
+6 -1
View File
@@ -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()