From b4196f58915f24727ab1c841639b720320dfb473 Mon Sep 17 00:00:00 2001 From: Badiboy Date: Thu, 9 Feb 2023 17:56:10 +0300 Subject: [PATCH] restrict_chat_member fix --- telebot/apihelper.py | 2 +- telebot/asyncio_helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 2a95eb0..a555f35 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -974,7 +974,7 @@ def restrict_chat_member( payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()} if use_independent_chat_permissions is not None: - permissions['use_independent_chat_permissions'] = use_independent_chat_permissions + payload['use_independent_chat_permissions'] = use_independent_chat_permissions if until_date is not None: if isinstance(until_date, datetime): payload['until_date'] = until_date.timestamp() diff --git a/telebot/asyncio_helper.py b/telebot/asyncio_helper.py index 9fa7345..4867498 100644 --- a/telebot/asyncio_helper.py +++ b/telebot/asyncio_helper.py @@ -966,7 +966,7 @@ async def restrict_chat_member( payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()} if use_independent_chat_permissions is not None: - permissions['use_independent_chat_permissions'] = use_independent_chat_permissions + payload['use_independent_chat_permissions'] = use_independent_chat_permissions if until_date is not None: if isinstance(until_date, datetime): payload['until_date'] = until_date.timestamp()