{"size": 949, "ext": "js", "max_stars_repo_path": "commands/nsfw/boobs.js", "max_stars_repo_name": "Eriknaitor/friskainet", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "commands/nsfw/boobs.js", "max_issues_repo_name": "Eriknaitor/friskainet", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "commands/nsfw/boobs.js", "max_forks_repo_name": "Eriknaitor/friskainet", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.7575757576, "max_line_length": 109, "alphanum_fraction": 0.5711275026}
const fetch = require('node-fetch');

module.exports = {
  name: 'boobs',
  description: 'Envía una foto de unos pechos',
  category: 'nsfw',
  cooldown: 5,
  run: async (interaction) => {
    const { util } = interaction.client;

    if (!interaction.member.roles.cache.some((r) => r.name === 'NSFW')) {
      return interaction.reply({ content: 'No tienes permisos para usar este comando' });
    }

    if (!interaction.channel.nsfw) return interaction.reply({ content: 'No puedes usar este comando aquí' });

    return fetch('http://api.oboobs.ru/boobs/0/1/random')
      .then(async (response) => {
        const responseJson = await response.json();

        interaction.reply({
          embeds: [{
            color: util.randomColor(),
            timestamp: `${interaction.createdAt}`,
            image: {
              url: `http://media.oboobs.ru/${responseJson[0].preview}`,
            },
          }],
        });
      });
  },
};
