const Discord = require("discord.js");

module.exports.run = async (bot, message, args) => {
  if(!message.guild) {
    return message.channel.send("Lütfen özel mesajlarda bu komutu kullanamayınız.")
  }

    let replies = ["https://i4.hurimg.com/i/hurriyet/75/750x422/55eb33e7f018fbb8f8b2057c.jpg", "https://i2.cnnturk.com/i/cnnturk/75/630x0/53a4458cc3332019b0f43612.jpg", "https://cdn.yemek.com/mnresize/940/940/uploads/2016/06/ramazan-capsleri.jpg", "https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRKVBnSW2AEIQzScglEK-yqpqvnvkTfpkTcq-2SnaCdJBe0Qjgy&usqp=CAU", "https://cdn.listetek.com/4552d5cca49d45b698b03a734d7ec1b8", "https://i.pinimg.com/236x/51/72/79/517279dce9406901772388a6d50ef709--hadi-cap-dagde.jpg", "https://i0.wp.com/thegeyik.com/wp-content/uploads/2014/08/anlayamazsiniz-anlayamazsiniz-sosyal-medya-tekne.jpg", "https://i.pinimg.com/474x/db/34/04/db340414a5442aad8b2bc86a10d4b807--guys-search.jpg", "https://i2.milimaj.com/i/milliyet/75/750x0/5c8d1f1b45d2a08af4215b9a", "https://img-s1.onedio.com/id-52e265d37b08d15b18000060/rev-0/w-635/listing/f-jpg-webp/s-628c990859524c371668a28f11050318cff6cfee.webp","https://img.memurlar.net/galeri/9660/116DAEC7-FF6B-E511-BBE8-14FEB5CC13C9.jpg?width=420","https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQwR91ngL89NumZm8ujZLENalnGvx9HmQDte79cK6spgjlnxfFB&usqp=CAU","https://static.daktilo.com/sites/455/uploads/2020/01/08/230-0.jpg","https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSLafcpysVsAWbtzRChAWdkscRDAR6lSFhn9Ct1HsbQV13rEb7P&usqp=CAU","https://cokiyiabi.com/wp-content/uploads/2017/02/iyi-geceler-komik-resimli-caps.jpg","https://i.pinimg.com/originals/21/8d/66/218d6698ee22b1a6bc3bc78245367a6f.jpg","https://forum.donanimhaber.com/cache-v2?path=https://store.donanimhaber.com/a1/35/34/a135345938cca8075529f13cee9dbbe0.jpg&t=110427838&width=240&text=1","https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSbK6sjof1z9mkS8rRdPFuRDP4aSSOm2-rO2LK-K9L7HPivK2So&usqp=CAU","https://2.bp.blogspot.com/-7q6raP0zEjc/VDVp_2bn_VI/AAAAAAAAB1U/f6VCJNuvJpQ/s1600/komik-capsler.blogspot.com.tr.bmp","https://d.wattpad.com/story_parts/215626281/images/142f1b13878f4519.jpg"];

    let result = Math.floor((Math.random() * replies.length));

    let gifembed = new Discord.RichEmbed()
        .setColor("#3a125a")
        .setFooter( `${message.author.tag} `, message.author.avatarURL)
        .setImage(replies[result]);

    message.channel.send(gifembed);
};

exports.conf = {
  enabled: true,
  guildOnly: false,
  aliases: [],
  permLevel: 0
};

exports.help = {
  name: 'caps',
  description: 'Rastgele caps  atar.',
  usage: 'caps'
};
