Advertisement
Guest User

commands / denunciar.js

a guest
Aug 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2.  
  3.  
  4. module.exports.run = async (L, message, arg, cnd) => {
  5.     if (cmd == 'denunciar') {
  6.     const args = message.content.split(" ").slice(1);
  7.     if (message.mentions.users.size  == 0) return message.reply('Mencione alguem')
  8.     if (!args.slice(1).join(' ')) return message.reply('Diga o motivo da denuncia! use a!denuncia (usuario) (motivo)')
  9.     var canal = message.guild.channels.find("name", "punições");
  10.     if (!canal) return;
  11.     canal.send({embed: {
  12.     'title':'Denuncia',
  13.     'description': args.slice(1).join(' '),
  14.     'thumbnail': {
  15.     'url': message.mentions.users.first().avatarURL
  16. }
  17.     ,'footer': {
  18.     'text': 'Usuario ' +  message.mentions.users.first().username
  19. },
  20.     'color': message.member.displayColor
  21. }})
  22.     message.delete().catch(O_o => { });
  23.     message.reply('Sua denuncia foi enviada com sucesso')
  24. }
  25.  
  26.  
  27. }
  28.  
  29. module.exports.help = {
  30.     name: "denunciar"
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement