Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const nsfw = require('pornsearch');
- client.on('message',async msg => {
- if(msg.author.bot) return undefined;
- let args = msg.content.split(" ").slice(1).join(" ")
- if (msg.content.startsWith(prefix + "sex")) {
- if (args[0] === 'video') {
- args.splice(0, 1);
- if (!args[0]) return msg.channel.send("Utilisation de la commande nsfw ```nsfw <gif|video> (defaut gif) <recherche mots clés Pornhub.com>```");
- const search = new nsfw.search(args);
- search.gifs()
- .then(gifs => {
- let rnd = Math.floor(Math.random() * Math.floor(gifs.length-1));
- msg.channel.send(`:underage: NSFW :underage: \n ${gifs[rnd].webm}`);
- });
- } else {
- if (args[0] === 'gif') { args.splice(0, 1); }
- if (!args[0]) return msg.channel.send("Utilisation de la commande nsfw ```nsfw <gif|video> (defaut gif) <recherche mots clés Pornhub.com>```");
- const search = new nsfw.search(args);
- search.gifs()
- .then(gifs => {
- let rnd = Math.floor(Math.random() * Math.floor(gifs.length-1));
- let emb = new Discord.RichEmbed()
- .addField(':underage: NSFW :underage:', `Recherche : '${args}'`)
- .setImage(gifs[rnd].url)
- .setColor([Math.round(Math.random()*255), Math.round(Math.random()*255), Math.round(Math.random()*255)])
- .setFooter('Gif fourni par Pornhub.com', `${msg.author.avatarURL}`);
- msg.channel.send({embed : emb});
- })
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment