Browse Source

Fix error about no pics found not popping up

master
Morgan Bazalgette 4 years ago
parent
commit
60f903e67a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      index.js

+ 1
- 1
index.js View File

@@ -66,7 +66,7 @@ var sendPic = function(userID, chatID) {
postID = utils.r(1, (+postCount));
request("http://gelbooru.com/index.php?page=dapi&s=post&q=index&limit=1" + tagsString(user.last_tags, user.rating) + "&pid=" + postID, function (err, re, body) {
utils.parseXml(body, function(err, result) {
if (typeof result.posts.post[0] === "undefined") {
if (typeof result.posts.post === "undefined") {
bot.sendMessage({
chat_id: userID,
text: "I'm sorry, but I was unable to find any images for those tags. Perhaps try again? I have reset the tags for you, btw."

Loading…
Cancel
Save