mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 09:09:10 +00:00
remove bot, force role order
This commit is contained in:
parent
677d91b17b
commit
dc1e7718bc
13 changed files with 15 additions and 1659 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue