From 77ab7bffe794b3048f376ce4ef4d3cbe385f9150 Mon Sep 17 00:00:00 2001 From: Leorio Paradinight <62891774+code-rgb@users.noreply.github.com> Date: Thu, 25 Mar 2021 20:01:31 +0530 Subject: [PATCH] Fix Layer 126 changes [user_id -> participant] (#648) --- pyrogram/methods/chats/restrict_chat_member.py | 2 +- pyrogram/methods/chats/set_administrator_title.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/methods/chats/restrict_chat_member.py b/pyrogram/methods/chats/restrict_chat_member.py index a7071bab..f8a05a0f 100644 --- a/pyrogram/methods/chats/restrict_chat_member.py +++ b/pyrogram/methods/chats/restrict_chat_member.py @@ -74,7 +74,7 @@ class RestrictChatMember(Scaffold): r = await self.send( raw.functions.channels.EditBanned( channel=await self.resolve_peer(chat_id), - user_id=await self.resolve_peer(user_id), + participant=await self.resolve_peer(user_id), banned_rights=raw.types.ChatBannedRights( until_date=until_date, send_messages=True if not permissions.can_send_messages else None, diff --git a/pyrogram/methods/chats/set_administrator_title.py b/pyrogram/methods/chats/set_administrator_title.py index 8fd1338b..fff4d617 100644 --- a/pyrogram/methods/chats/set_administrator_title.py +++ b/pyrogram/methods/chats/set_administrator_title.py @@ -60,7 +60,7 @@ class SetAdministratorTitle(Scaffold): r = (await self.send( raw.functions.channels.GetParticipant( channel=chat_id, - user_id=user_id + participant=user_id ) )).participant