text: const Discord = module.require("discord.js");
  const moment = require("moment");
  const { oneLine } = require("common-tags");
  
  module.exports = {
      name: "userinfo",
      aliases: ["ui"],
      run: async (client, message, args) => {
          const permissions = {
              "ADMINISTRATOR": "Administrator",
              "MANAGE_GUILD": "Manage Server",
              "MANAGE_ROLES": "Manage Roles",
              "MANAGE_CHANNELS": "Manage Channels",
              "KICK_MEMBERS": "Kick Members",
              "BAN_MEMBERS": "Ban Members",
              "MANAGE_NICKNAMES": "Manage Nicknames",
              "MANAGE_EMOJIS": "Manage Emojis",
              "MANAGE_WEBHOOKS": "Manage Webhooks",
              "MANAGE_MESSAGES": "Manage Messages",
              "MENTION_EVERYONE": "Mention Everyone"
          }
          const mention = message.mentions.members.first() || message.member;
          const nick = mention.nickname === null ? "None" : mention.nickname;
          const roles = mention.roles.cache.get === "" ? "None" : mention.roles.cache.get;
          const usericon = mention.user.avatarURL;
          const act = mention.user.presence.status.toUpperCase();
          const game = mention.user.presence.game || "None";
          const mentionPermissions = mention.permissions.toArray() === null ? "None" : mention.permissions.toArray();
          const finalPermissions = [];
          for (const permission in permissions) {
              if (mentionPermissions.includes(permission)) finalPermissions.push(`${permissions[permission]}`);
              else;
          }
          var flags = {
              "": "None",
              "DISCORD_EMPLOYEE": "Discord Employee",
              "DISCORD_PARTNER": "Discord Partner",
              "BUGHUNTER_LEVEL_1": "Bug Hunter (Level 1)",
              "BUGHUNTER_LEVEL_2": "Bug Hunter (Level 2)",
              "HYPESQUAD_EVENTS": "Hypesquad Events",
              "HOUSE_BRILLIANCE": "HypeSquad Brilliance",
              "HOUSE_BRAVERY": "HypeSquad Bravery",
              "HOUSE_BALANCE": "HypeSquad Balance",
              "EARLY_SUPPORTER": "Early Supporter",
              "TEAM_USER": "Team User",
              "VERIFIED_BOT": "Verified Bot",
              "VERIFIED_DEVELOPER": "Verified Bot Developer"
          };
          var bot = {
              "true": "Yes, The User is a Bot",
              "false": "No, The User is a Human"
          };
          const userlol = new Discord.MessageEmbed()
          .setAuthor(`User Info`, mention.user.avatarURL())
          .setThumbnail(usericon)
          .addField(`General Info`, `Name: \`${mention.user.username}\` \nTag: \`${mention.user.discriminator}\` \nNickname: \`${nick}\``)
          .addField(`Overview`, `Badges: \`${flags[mention.user.flags.toArray().join(", ")]}\` \nStatus: \`${act}\` \nActivity: \`${game}\` \nIs Bot: \`${bot[mention.user.bot]}\``)
          .addField(`Server Relating Info`, `Roles: <@&${mention._roles.join(">  <@&")}> \nKey Permissions: \`${finalPermissions.join(', ')}\``)
          .addField(`Misc Info`, `Acc Created on: \n\`${moment(mention.user.createdAt).format("dddd, MMMM Do YYYY, h:mm:ss A")}\` \nJoined This Server on: \n\`${moment(mention.joinedAt).format("dddd, MMMM Do YYYY, h:mm:ss A")}\``)
          .setThumbnail(mention.user.avatarURL())
          .setFooter(`ID: ${mention.user.id}`, mention.user.avatarURL())
          .setTimestamp()
          .setColor("RANDOM");
          message.channel.send(userlol)
      }
  }
  