{"size": 1680, "ext": "js", "max_stars_repo_path": "commands/nsfw/boobs.js", "max_stars_repo_name": "furtivespy/node-discord-bot", "max_stars_repo_stars_event_min_datetime": "2019-03-13T22:14:17.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-13T22:14:17.000Z", "max_issues_repo_path": "commands/nsfw/boobs.js", "max_issues_repo_name": "furtivespy/node-discord-bot", "max_issues_repo_issues_event_min_datetime": "2021-01-26T04:33:31.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-29T20:38:04.000Z", "max_forks_repo_path": "commands/nsfw/boobs.js", "max_forks_repo_name": "furtivespy/node-discord-bot", "max_forks_repo_forks_event_min_datetime": "2019-03-13T22:12:17.000Z", "max_forks_repo_forks_event_max_datetime": "2019-03-13T22:12:17.000Z"}
{"max_stars_count": 1, "max_issues_count": 6, "max_forks_count": 1, "avg_line_length": 40.0, "max_line_length": 214, "alphanum_fraction": 0.5369047619}
const Command = require('../../base/Command.js')
const fetch = require('node-fetch');

class Boobs extends Command {
    constructor(client){
        super(client, {
            name: "boobs",
            description: "Show me boobies!!!",
            category: "NSFW",
            usage: "This command finds a picture of boobs",
            enabled: true,
            guildOnly: false,
            allMessages: false,
            showHelp: true,
            aliases: ["breasts", "(.)(.)", "jugs","cans","knockers","bongos","bubbies","bumpers","bewbz","tits","tatas","chesticles","gazongas","titties","headlamps","honkburgers","jubblies","mankillers","melons"],
            permLevel: "User"
          })
    }
  
    async run(message, args, level) { // eslint-disable-line no-unused-vars
      if (!message.channel.nsfw) return message.channel.send("🔞 Cannot display NSFW content in a SFW channel.");
      const msg = await message.channel.send(`**${message.member.displayName}** is looking for boobies...`);
      fetch("http://api.oboobs.ru/boobs/0/1/random").then(res => res.json()).then( async body => {
        await msg.edit({
            embed: {
            "title": "Click here if the image failed to load.",
            "url": `http://media.oboobs.ru/${body[0].preview}`,
            "color": 15285942,
            "image": {
                "url": `http://media.oboobs.ru/${body[0].preview}`
            },
            "footer": {
                "icon_url": message.author.displayAvatarURL(),
                "text": `Requested by ${message.author.tag} | Powered by oboobs.ru`
            }
            }
        });
      });
    }
  }
  
  module.exports = Boobs;