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
|
break
|
||||||
|
|
||||||
logger.debug(f"Creating role: {role.name}")
|
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(
|
fluxer_id = await context.fluxer_writer.create_role(
|
||||||
name=role.name,
|
name=role.name,
|
||||||
color=role.color.value,
|
color=role.color.value,
|
||||||
hoist=role.hoist,
|
hoist=role.hoist,
|
||||||
mentionable=role.mentionable,
|
mentionable=role.mentionable,
|
||||||
|
permissions=role.permissions.value,
|
||||||
position=role.position
|
position=role.position
|
||||||
)
|
)
|
||||||
if fluxer_id:
|
if fluxer_id:
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ class FluxerWriter:
|
||||||
print(f"Failed to send marker: {e}")
|
print(f"Failed to send marker: {e}")
|
||||||
return None
|
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.
|
Creates a new role in the Fluxer community.
|
||||||
Returns the new Fluxer role ID.
|
Returns the new Fluxer role ID.
|
||||||
|
|
@ -402,6 +402,7 @@ class FluxerWriter:
|
||||||
color=color,
|
color=color,
|
||||||
hoist=hoist,
|
hoist=hoist,
|
||||||
mentionable=mentionable,
|
mentionable=mentionable,
|
||||||
|
permissions=permissions,
|
||||||
position=position
|
position=position
|
||||||
)
|
)
|
||||||
return str(role["id"])
|
return str(role["id"])
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue