gaber-elsayed

Nsfw Pornhub (JS)

Dec 19th, 2019
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. const nsfw = require('pornsearch');
  2. client.on('message',async msg => {
  3. if(msg.author.bot) return undefined;
  4. let args = msg.content.split(" ").slice(1).join(" ")
  5. if (msg.content.startsWith(prefix + "sex")) {
  6. if (args[0] === 'video') {
  7. args.splice(0, 1);
  8. if (!args[0]) return msg.channel.send("Utilisation de la commande nsfw ```nsfw <gif|video> (defaut gif) <recherche mots clés Pornhub.com>```");
  9. const search = new nsfw.search(args);
  10. search.gifs()
  11. .then(gifs => {
  12. let rnd = Math.floor(Math.random() * Math.floor(gifs.length-1));
  13. msg.channel.send(`:underage: NSFW :underage: \n ${gifs[rnd].webm}`);
  14. });
  15. } else {
  16. if (args[0] === 'gif') { args.splice(0, 1); }
  17. if (!args[0]) return msg.channel.send("Utilisation de la commande nsfw ```nsfw <gif|video> (defaut gif) <recherche mots clés Pornhub.com>```");
  18. const search = new nsfw.search(args);
  19. search.gifs()
  20. .then(gifs => {
  21. let rnd = Math.floor(Math.random() * Math.floor(gifs.length-1));
  22. let emb = new Discord.RichEmbed()
  23. .addField(':underage: NSFW :underage:', `Recherche : '${args}'`)
  24. .setImage(gifs[rnd].url)
  25. .setColor([Math.round(Math.random()*255), Math.round(Math.random()*255), Math.round(Math.random()*255)])
  26. .setFooter('Gif fourni par Pornhub.com', `${msg.author.avatarURL}`);
  27. msg.channel.send({embed : emb});
  28. })
  29. }
  30. }
  31. });
Advertisement
Add Comment
Please, Sign In to add comment