daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(cmd === `${prefix}warn`) {
  2.     message.delete()
  3.     const member =  message.mentions.members.first()
  4.     const warns = await db.fetch(`warns_${member.id}`)
  5.         if(!message.member.hasPermission("ADMINISTRATOR")) return;
  6.         let quantidade = args[1]
  7.         if(!quantidade) quantidade = "1"
  8.         db.add(`warns_${member.id}`, quantidade)      
  9.         const warnembed = new Discord.RichEmbed()
  10.         .setTitle("Usuário advertido")
  11.         .setColor('#fffa00')
  12.         .addField("Membro", `${member}`)
  13.         .addField("ID", `${member.id}`)
  14.         .addField("Staffer", `${message.author}`)
  15.         .addField("Motivo", "Não soube ler as regras")
  16.         message.channel.send(warnembed).then(() => {
  17.         message.channel.send(`${member} agora possui ` + warns + " warns")
  18.         })
  19.         if(warns > 9) {
  20.         await member.ban().then(() => {
  21.         const wbanembed = new Discord.RichEmbed()
  22.         .setTitle(`Usuário banido`)
  23.         .setColor('RANDOM')
  24.         .addField(`Membro`, `${member}`)
  25.         .addField(`ID`, `${member.id}`)
  26.         .addField(`Staffer`, `${message.author}`)
  27.         .addField(`Motivo`, `Atingiu 10 warns`)  
  28.         message.channel.send(wbanembed)  
  29.         })
  30.         }
  31.         if(warns === 8) {
  32.         await member.kick().then(() => {
  33.         const wkickembed = new Discord.RichEmbed()
  34.         .setTitle(`Usuário expulso`)
  35.         .setColor('RANDOM')
  36.         .addField(`Membro`, `${member}`)
  37.         .addField(`ID`, `${member.id}`)
  38.         .addField(`Staffer`, `${message.author}`)
  39.         .addField(`Motivo`, `Atingiu 8 warns`)  
  40.         message.channel.send(wkickembed)
  41.         })
  42.         }  
  43.         if(warns === 9) {
  44.         await member.kick().then(() => {
  45.         const wkickembed2 = new Discord.RichEmbed()
  46.         .setTitle(`Usuário expulso`)
  47.         .setColor('RANDOM')
  48.         .addField(`Membro`, `${member}`)
  49.         .addField(`ID`, `${member.id}`)
  50.         .addField(`Staffer`, `${message.author}`)
  51.         .addField(`Motivo`, `Atingiu 9 warns`)  
  52.         message.channel.send(wkickembed2)
  53.         })
  54.         }
  55.         if(warns === 4) {
  56.           const role = message.guild.roles.find(r => r.name == "Muted");
  57.           member.addRole(role);
  58.           const wmuteembed2 = new Discord.RichEmbed()
  59.           .setTitle(`Usuário mutado (*por 10 min*)`)
  60.           .setColor('RANDOM')
  61.           .addField(`Membro`, `${member}`)
  62.           .addField(`ID`, `${member.id}`)
  63.           .addField(`Staffer`, `${message.author}`)
  64.           .addField(`Motivo`, `Atingiu 4 warns`)  
  65.           message.channel.send(wmuteembed2);
  66.  
  67.           setTimeout(() => {
  68.             member.removeRole(role);
  69.             }, 600000);
  70.          
  71.         }
  72.  
  73.       }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top