text: const Discord = require("discord.js");
  const {MessageEmbed} = require("discord.js");
  const config = require("../../botconfig/config.json");
  var ee = require("../../botconfig/embed.json");
  const { GetUser } = require("../../handlers/functions")
  const settings = require("../../botconfig/settings.json");
  module.exports = {
    name: "permissions", //the command name for execution & for helpcmd [OPTIONAL]
    category: "Information", //the command category for helpcmd [OPTIONAL]
    aliases: ["perms"], //the command aliases for helpcmd [OPTIONAL]
    cooldown: 5, //the command cooldown for execution & for helpcmd [OPTIONAL]
    usage: "permissions [@USER]", //the command usage for helpcmd [OPTIONAL]
    description: "Shows the Permissions of a Member", //the command description for helpcmd [OPTIONAL]
    memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL]
    requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL]
    alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL]
    minargs: 0, // minimum args for the message, 0 == none [OPTIONAL]
    maxargs: 0, // maximum args for the message, 0 == none [OPTIONAL]
    minplusargs: 0, // minimum args for the message, splitted with "++" , 0 == none [OPTIONAL]
    maxplusargs: 0, // maximum args for the message, splitted with "++" , 0 == none [OPTIONAL]
    argsmissing_message: "", //Message if the user has not enough args / not enough plus args, which will be sent, leave emtpy / dont add, if you wanna use command.usage or the default message! [OPTIONAL]
    argstoomany_message: "", //Message if the user has too many / not enough args / too many plus args, which will be sent, leave emtpy / dont add, if you wanna use command.usage or the default message! [OPTIONAL]
    run: async (client, message, args, plusArgs, cmdUser, text, prefix) => {
      try {   
        var user;
        if(args[0]){
          try{
              user = await GetUser(message, args)
          }catch (e){
            if(!e) return message.reply("UNABLE TO FIND THE USER")
            return message.reply(e)
          }
        }else{
          user = message.author;
        }
        if(!user || user == null || user.id == null || !user.id) message.reply("❌ Could not find the USER")
        try{
          const member = message.guild.members.cache.get(user.id);
          //create the EMBED
          const embeduserinfo = new MessageEmbed()
          embeduserinfo.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
          embeduserinfo.setAuthor("Permissions from:   " + member.user.username + "#" + member.user.discriminator, member.user.displayAvatarURL({ dynamic: true }), "https://clan.milrato.eu")
          embeduserinfo.addField('**❱ Permissions:**',`${message.member.permissions.toArray().map(p=>`\`${p}\``).join(", ")}`)
          embeduserinfo.setColor(ee.color)
          embeduserinfo.setFooter(ee.footertext, ee.footericon)
          //send the EMBED
          message.reply({embeds: [embeduserinfo]})
        }catch (e){
          console.log(e)
          //create the EMBED
          const embeduserinfo = new MessageEmbed()
          embeduserinfo.setThumbnail(user.displayAvatarURL({ dynamic: true, size: 512 }))
          embeduserinfo.setAuthor("Permissions from:   " + user.username + "#" + user.discriminator, user.displayAvatarURL({ dynamic: true }), "https://clan.milrato.eu")
          embeduserinfo.addField('**❱ Permissions:**',`${message.member.permissions.toArray().map(p=>`\`${p}\``).join(", ")}`)
          embeduserinfo.setColor(ee.color)
          embeduserinfo.setFooter(ee.footertext, ee.footericon)
          //send the EMBED
          message.reply({embeds: [embeduserinfo]})
        }
        
      } catch (e) {
        console.log(String(e.stack).bgRed)
        return message.reply({embeds: [new MessageEmbed()
            .setColor(ee.wrongcolor)
            .setFooter(ee.footertext, ee.footericon)
            .setTitle(`❌ ERROR | An error occurred`)
            .setDescription(`\`\`\`${e.message ? String(e.message).substr(0, 2000) : String(e).substr(0, 2000)}\`\`\``)
        ]});
      }
    }
  }
  /**
   * @INFO
   * Bot Coded by Tomato#6966 | https://github.com/Tomato6966/discord-js-lavalink-Music-Bot-erela-js
   * @INFO
   * Work for Milrato Development | https://milrato.eu
   * @INFO
   * Please mention Him / Milrato Development, when using this Code!
   * @INFO
   */
  