const Discord = require("discord.js"); exports.run = (client, message, args) => { if (!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send(`> ${message.author} \n > ⚠️ **Você não tem permissão para utilizar esse comand0o!**`); message.channel .send(`> **Em qual canal você deseja anunciar?**`) .then(msg => { let cp = message.channel.createMessageCollector(x => x.author.id == message.author.id, {max: 1}) .on("collect", c => {let canal = c.mentions.channels.first(); if (!canal) { message.reply("mencione um canal!"); } else { message.channel .send(`> **Qual a mensagem desse anúncio?**`) .then(msg2 => { let c1 = message.channel .createMessageCollector( x => x.author.id == message.author.id, { max: 1 } ) .on("collect", c => { let desc = c.content; message.channel .send(`> **Qual é o título?**`) .then(msg3 => { let ck = message.channel .createMessageCollector( x => x.author.id == message.author.id, { max: 1 } ) .on("collect", c => { let title = c.content; message.channel.send( `> ${message.author} \n > **Seu anúncio foi enviado ao canal ${canal} com sucesso!**` ); let anuncioembed = new Discord.RichEmbed() .setColor("#7331db") .setFooter( `Anúncio realizado por: ${message.author.username}`, message.author.avatarURL ) .setTitle(title) .setDescription(desc); canal.send(`||@here||`, anuncioembed); }); }); }); }); } }); }); }; exports.help = { name: "anunciar-here", aliases: ["anuncio-here", "alerta-here", "alert-here"] };