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"
};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"
};defaultMemberPermissionsdefaultMemberPermissions returns with a number. How do i make this a string, such as administratoradministrator?