remove bot, force role order

This commit is contained in:
41666 2023-05-28 09:47:19 -04:00
parent 677d91b17b
commit dc1e7718bc
13 changed files with 15 additions and 1659 deletions

View file

@ -47,15 +47,18 @@ export const getGuild = async (
.filter((x) => x !== undefined) as APIRole[]
)?.position || -1;
const roles = guildRaw.roles.map<Role>((role) => ({
id: role.id,
name: role.name,
color: role.color,
managed: role.managed,
position: role.position,
permissions: role.permissions,
safety: calculateRoleSafety(role, highestRolePosition),
}));
const roles = guildRaw.roles
.map<Role>((role) => ({
id: role.id,
name: role.name,
color: role.color,
managed: role.managed,
position: role.position,
permissions: role.permissions,
safety: calculateRoleSafety(role, highestRolePosition),
}))
// sort so that highest is first
.sort((a, b) => b.position - a.position);
const guild: Guild & OwnRoleInfo = {
id,