Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cmds = client.comandos.get(command) || client.comandos.find(cmd => cmd.help.aliases && cmd.help.aliases.includes(command));
- console.log(cmds)
- let error404 = new Discord.RichEmbed()
- .setTitle("ERROR 404")
- .setDescription("[Comando] : `"+command+"` No Existe.")
- .setColor("#FF2C2C")
- let disable = new Discord.RichEmbed()
- .setColor("RANDOM")
- .setAuthor(message.author.tag, message.author.displayAvatarURL)
- .setDescription('The command `'+command+'` has been disabled.');
- let botembed = new Discord.RichEmbed()
- .setColor("RANDOM")
- .setAuthor(message.author.tag, message.author.displayAvatarURL)
- .setDescription(`Oops, I don't have permission to do this. Require \`\`${cmds.help.botPermissions}\`\``);
- //esta parte tira el error
- let Permits = new Discord.RichEmbed()
- .setColor("RANDOM")
- .setAuthor(message.author.tag, message.author.displayAvatarURL)
- .setDescription(`You do not have permission to do this. Require \`\`${cmds.help.permission}\`\``);
- /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
- //if(message.content.length <= 1) return;
- if(!cmds) return; //message.channel.send(error404)
- if(cmds.help.disabled === true) return message.channel.send(disable)
- if(!message.member.hasPermission(cmds.help.permission)) return message.channel.send(Permits)
- if(!message.guild.me.hasPermission(cmds.help.botPermissions)) return message.channel.send(botembed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement