mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Fix it again
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class GelbooruCommand extends Command {
|
||||
limit: 1
|
||||
});
|
||||
const { posts } = await xml(text);
|
||||
if (!posts.$.count) throw new Error('No Results.');
|
||||
if (posts.$.count === '0') throw new Error('No Results.');
|
||||
return msg.say(`Result for ${query}:`, { files: [`https:${posts.post[0].$.file_url}`] })
|
||||
.catch(err => msg.say(`${err.name}: ${err.message}`));
|
||||
} catch (err) {
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class Rule34Command extends Command {
|
||||
limit: 1
|
||||
});
|
||||
const { posts } = await xml(text);
|
||||
if (!posts.$.count) throw new Error('No Results.');
|
||||
if (posts.$.count === '0') throw new Error('No Results.');
|
||||
return msg.say(`Result for ${query}:`, { files: [`https:${posts.post[0].$.file_url}`] })
|
||||
.catch(err => msg.say(`${err.name}: ${err.message}`));
|
||||
} catch (err) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "19.8.0",
|
||||
"version": "19.8.1",
|
||||
"description": "A Discord Bot",
|
||||
"main": "shardingmanager.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user