How to I turn Permission numbers into a string / array?

const directories = [
        ...new Set(interaction.client.commands.map((cmd) => cmd.folder)),
      ];
  
      const formatString = (str) =>
        `${str[0].toUpperCase()}${str.slice(1).toLowerCase()}`;
  
      const categories = directories.map((dir) => {
        const getCommands = interaction.client.commands
          .filter((cmd) => cmd.folder === dir)
          .map((cmd) => {
            return {
              name: cmd.data.name,
              description:
                cmd.data.description ||
                "There is no description for this command.",
             -->  defaultMemberPermissions: cmd.data.default_member_permissions// || "There are no defualt member permissions for this command"
            };

defaultMemberPermissions
returns with a number. How do i make this a string, such as
administrator
?
Was this page helpful?