Fix it again

This commit is contained in:
Daniel Odendahl Jr
2017-05-18 03:08:41 +00:00
parent 996aa397de
commit 8706a7e8a7
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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
View File
@@ -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": {