Reformat all files with Prettier

This commit is contained in:
Dragory 2021-09-11 19:06:51 +03:00
parent 0cde0d46d2
commit ac79eb09f5
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
206 changed files with 727 additions and 888 deletions

View file

@ -35,13 +35,13 @@ export async function getRoleInfoEmbed(
round: true,
});
const rolePerms = Object.keys(role.permissions.toJSON()).map(p =>
const rolePerms = Object.keys(role.permissions.toJSON()).map((p) =>
p
// Voice channel related permission names start with 'voice'
.replace(/^voice/i, "")
.replace(/([a-z])([A-Z])/g, "$1 $2")
.toLowerCase()
.replace(/(^\w{1})|(\s{1}\w{1})/g, l => l.toUpperCase()),
.replace(/(^\w{1})|(\s{1}\w{1})/g, (l) => l.toUpperCase()),
);
// -1 because of the @everyone role
@ -54,10 +54,7 @@ export async function getRoleInfoEmbed(
ID: \`${role.id}\`
Created: **${roleAge} ago** (\`${prettyCreatedAt}\`)
Position: **${role.position} / ${totalGuildRoles}**
Color: **#${role.color
.toString(16)
.toUpperCase()
.padStart(6, "0")}**
Color: **#${role.color.toString(16).toUpperCase().padStart(6, "0")}**
Mentionable: **${role.mentionable ? "Yes" : "No"}**
Hoisted: **${role.hoist ? "Yes" : "No"}**
Permissions: \`${rolePerms.length ? rolePerms.join(", ") : "None"}\`