Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- exports.run = async (bot, message, args) => {
- if(!message.member.hasPermission("MENTION_EVERYONE", "ADMINISTRATOR")) return message.reply("VocΓͺ nΓ£o tem o direito de usar esse comando!");
- message.delete().catch(O_o=>{});
- var args = message.content.split(" ").slice(1).join(" ");
- if (!args) return message.reply("Insira o seu aviso");
- const embed = new Discord.RichEmbed()
- .setTitle('π AVISO π')
- .setColor("36393e")
- .setDescription(args)
- .setTimestamp()
- .setFooter(`Aviso enviado por: ${message.author.tag}`, `${message.author.avatarURL}`)
- message.channel.send(embed).then(msg => {
- msg.react("π")
- .then(() => msg.react("β"))
- let filtro = (reaction, user) => reaction.emoji.name === "π" && user.id === message.author.id;
- const coletor = msg.createReactionCollector(filtro, {max: 1, time: 60000});
- coletor.on("collect", () => {
- message.channel.send('@everyone');
- });
- const qEmbed = new Discord.RichEmbed()
- .setTitle('β AVISO CANCELADO β')
- .setColor("36393e")
- .setTimestamp()
- .setFooter(`Aviso cancelado por: ${message.author.tag}`, `${message.author.avatarURL}`)
- let filtro2 = (reaction, user) => reaction.emoji.name === "β" && user.id === message.author.id;
- const coletor2 = msg.createReactionCollector(filtro2, {max: 1, time: 60000});
- coletor2.on("collect", () => {
- msg.edit(qEmbed)
- });
- let filtro1 = (reaction, user) => reaction.emoji.name === "β" && user.id === message.author.id;
- const coletor1 = msg.createReactionCollector(filtro1, {max: 1, time: 60000});
- coletor1.on("collect", () => {
- msg.channel.bulkDelete(1)
- });
- });
- }
- exports.help = {
- name: "aviso"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement