mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Fix Gelbooru
This commit is contained in:
@@ -37,8 +37,8 @@ module.exports = class GelbooruCommand extends Command {
|
|||||||
const { posts } = await xml.parseStringAsync(text);
|
const { posts } = await xml.parseStringAsync(text);
|
||||||
if (posts.$.count === '0') return msg.say('No Results.');
|
if (posts.$.count === '0') return msg.say('No Results.');
|
||||||
return msg.say(stripIndents`
|
return msg.say(stripIndents`
|
||||||
Result for ${query}:
|
${query ? `Result for ${query}:` : 'Random Image:'}
|
||||||
https:${posts.post[Math.floor(Math.random * posts.post.length)].$.file_url}
|
https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = class Rule34Command extends Command {
|
|||||||
const { posts } = await xml.parseStringAsync(text);
|
const { posts } = await xml.parseStringAsync(text);
|
||||||
if (posts.$.count === '0') return msg.say('No Results.');
|
if (posts.$.count === '0') return msg.say('No Results.');
|
||||||
return msg.say(stripIndents`
|
return msg.say(stripIndents`
|
||||||
Result for ${query}:
|
${query ? `Result for ${query}:` : 'Random Image:'}
|
||||||
https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url}
|
https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user