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