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"]
};
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}