Fixed a bug where Role order was reversed in Fluxer
This commit is contained in:
parent
37443bf04c
commit
dfcedb9d07
1 changed files with 2 additions and 2 deletions
|
|
@ -132,8 +132,8 @@ async def sync_permissions(context: MigrationContext, progress_callback: Callabl
|
|||
async def migrate_roles(context: MigrationContext, progress_callback: Callable[[str, int, int], Awaitable[None]] | None = None, force: bool = False) -> list[str]:
|
||||
"""Copies roles and their baseline permissions. Returns a list of cloned role names."""
|
||||
# Sort roles by position to respect Discord hierarchy
|
||||
roles = sorted(await context.discord_reader.get_roles(), key=lambda r: r.position)
|
||||
|
||||
roles = sorted(await context.discord_reader.get_roles(), key=lambda r: r.position, reverse=True)
|
||||
|
||||
if not force:
|
||||
roles = [r for r in roles if not context.state.get_fluxer_role_id(str(r.id))]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue