Advertisement
Guest User

error code

a guest
Oct 20th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var cmds = client.comandos.get(command) || client.comandos.find(cmd => cmd.help.aliases && cmd.help.aliases.includes(command));
  2.  
  3.   console.log(cmds)
  4.  
  5.   let error404 = new Discord.RichEmbed()
  6.     .setTitle("ERROR 404")
  7.     .setDescription("[Comando] : `"+command+"` No Existe.")
  8.     .setColor("#FF2C2C")
  9.  
  10.   let disable = new Discord.RichEmbed()
  11.    .setColor("RANDOM")
  12.   .setAuthor(message.author.tag, message.author.displayAvatarURL)
  13.   .setDescription('The command `'+command+'` has been disabled.');
  14.  
  15.   let botembed = new Discord.RichEmbed()
  16.   .setColor("RANDOM")
  17.   .setAuthor(message.author.tag, message.author.displayAvatarURL)
  18.   .setDescription(`Oops, I don't have permission to do this. Require \`\`${cmds.help.botPermissions}\`\``);
  19.                                                                         //esta parte tira el error
  20.   let Permits = new Discord.RichEmbed()
  21.   .setColor("RANDOM")
  22.  .setAuthor(message.author.tag, message.author.displayAvatarURL)
  23.  .setDescription(`You do not have permission to do this. Require \`\`${cmds.help.permission}\`\``);
  24.   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  25.  
  26. //if(message.content.length <= 1) return;
  27. if(!cmds) return; //message.channel.send(error404)
  28. if(cmds.help.disabled === true) return message.channel.send(disable)
  29. if(!message.member.hasPermission(cmds.help.permission)) return message.channel.send(Permits)
  30. if(!message.guild.me.hasPermission(cmds.help.botPermissions)) return message.channel.send(botembed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement