channels: fix typo on Target instantiation

possible work in the future is to have discrete types for user id,
channel id, etc, instead of putting everything on `int`.

cherry-picked from: 0530462a0b
This commit is contained in:
Luna 2022-08-28 15:27:49 -03:00
parent d44541748e
commit 3a0b5307a3
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ async def _process_overwrites(guild_id: int, channel_id: int, overwrites: list)
target_role = None if target_type == 0 else overwrite["id"] target_role = None if target_type == 0 else overwrite["id"]
target_user = overwrite["id"] if target_type == 0 else None target_user = overwrite["id"] if target_type == 0 else None
target = Target(target_type, target_role, target_user) target = Target(target_type, target_user, target_role)
col_name = "target_user" if target.is_user else "target_role" col_name = "target_user" if target.is_user else "target_role"
constraint_name = f"channel_overwrites_{col_name}_uniq" constraint_name = f"channel_overwrites_{col_name}_uniq"