Bläddra i källkod

Fix error about no pics found not popping up

master
Morgan Bazalgette 4 år sedan
förälder
incheckning
60f903e67a
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      index.js

+ 1
- 1
index.js Visa fil

@@ -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."

Laddar…
Avbryt
Spara