Fixed a bug where permissions were not propagated to fluxer roles
This commit is contained in:
parent
3554b1612f
commit
37443bf04c
2 changed files with 4 additions and 1 deletions
|
|
@ -148,11 +148,13 @@ async def migrate_roles(context: MigrationContext, progress_callback: Callable[[
|
|||
break
|
||||
|
||||
logger.debug(f"Creating role: {role.name}")
|
||||
# No permission mapping nescessary since fluxer uses the same permission map as discord
|
||||
fluxer_id = await context.fluxer_writer.create_role(
|
||||
name=role.name,
|
||||
color=role.color.value,
|
||||
hoist=role.hoist,
|
||||
mentionable=role.mentionable,
|
||||
permissions=role.permissions.value,
|
||||
position=role.position
|
||||
)
|
||||
if fluxer_id:
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ class FluxerWriter:
|
|||
print(f"Failed to send marker: {e}")
|
||||
return None
|
||||
|
||||
async def create_role(self, name: str, color: int, hoist: bool, mentionable: bool, position: Optional[int] = None) -> str:
|
||||
async def create_role(self, name: str, color: int, hoist: bool, mentionable: bool, permissions: int, position: Optional[int] = None) -> str:
|
||||
"""
|
||||
Creates a new role in the Fluxer community.
|
||||
Returns the new Fluxer role ID.
|
||||
|
|
@ -402,6 +402,7 @@ class FluxerWriter:
|
|||
color=color,
|
||||
hoist=hoist,
|
||||
mentionable=mentionable,
|
||||
permissions=permissions,
|
||||
position=position
|
||||
)
|
||||
return str(role["id"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue