mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
Fix
This commit is contained in:
@@ -51,7 +51,11 @@ module.exports = class XiaoCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const data = await this.sauceNao(img);
|
const data = await this.sauceNao(img);
|
||||||
if (data && data[0].similarity > 90) {
|
if (data && data[0].similarity > 90) {
|
||||||
result = `Art by [${data[0].authorName}](${data[0].authorUrl}) | Source: <${data[0].url}>`;
|
result = '';
|
||||||
|
const sauce = data[0];
|
||||||
|
if (sauce.authorName && sauce.authorUrl) result += `Art by [${sauce.authorName}](<${sauce.authorUrl}>) | `;
|
||||||
|
if (sauce.authorName && !sauce.authorUrl) result += `Art by ${sauce.authorName} | `;
|
||||||
|
result += `Art Source: <${sauce.url}>`;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user