1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

restrict_chat_member fix

This commit is contained in:
Badiboy 2023-02-09 17:56:10 +03:00
parent e55fe962ca
commit b4196f5891
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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()