MhankBarBar / whatsapp-bot

WhatsApp Bot
Apache License 2.0
724 stars 827 forks source link

RandomNsfw not work #186

Open AlissoNNunes1 opened 3 years ago

AlissoNNunes1 commented 3 years ago

image image

the commands not work,but the site yes,

how can i fix?

AlissoNNunes1 commented 3 years ago

please help me

lxndr-rl commented 3 years ago

This API is better https://nekobot.xyz/api/image

Read the docs: https://docs.nekobot.xyz/#image-endpoints-image

AlissoNNunes1 commented 3 years ago

This API is better https://nekobot.xyz/api/image

Read the docs: https://docs.nekobot.xyz/#image-endpoints-image

I looked at the site and I was confused, how should I replace this API. Sorry for my ignorance

lxndr-rl commented 3 years ago

Please try this I use that api on my discord bot. 1.- npm i superagent


var superagent = require("superagent");
superagent
        .get("https://nekobot.xyz/api/image")
        .query({ type: args[1] })
        .end((err, response) => {
          if (!err) {
            client.sendFileFromUrl(from, response.body.message, 'nsfw.png', `_${args[1]}_`, id);
          } else {
             client.reply(from, response.body.message, id)
          }
        });