From d101fc1c7a42a7844921ebe42f5f774b6d43c00d Mon Sep 17 00:00:00 2001 From: Alisson Lauffer Date: Thu, 5 Nov 2020 00:06:37 -0300 Subject: [PATCH] Bot API 5.0: Add only_if_banned parameter to unbanChatMember --- amanobot/__init__.py | 3 ++- amanobot/aio/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/amanobot/__init__.py b/amanobot/__init__.py index 85f9015..6da740f 100644 --- a/amanobot/__init__.py +++ b/amanobot/__init__.py @@ -805,7 +805,8 @@ def kickChatMember(self, chat_id, user_id, p = _strip(locals()) return self._api_request('kickChatMember', _rectify(p)) - def unbanChatMember(self, chat_id, user_id): + def unbanChatMember(self, chat_id, user_id, + only_if_banned=None): """ See: https://core.telegram.org/bots/api#unbanchatmember """ p = _strip(locals()) return self._api_request('unbanChatMember', _rectify(p)) diff --git a/amanobot/aio/__init__.py b/amanobot/aio/__init__.py index 491eb05..9843f35 100644 --- a/amanobot/aio/__init__.py +++ b/amanobot/aio/__init__.py @@ -389,7 +389,8 @@ async def kickChatMember(self, chat_id, user_id, p = _strip(locals()) return await self._api_request('kickChatMember', _rectify(p)) - async def unbanChatMember(self, chat_id, user_id): + async def unbanChatMember(self, chat_id, user_id, + only_if_banned=None): """ See: https://core.telegram.org/bots/api#unbanchatmember """ p = _strip(locals()) return await self._api_request('unbanChatMember', _rectify(p))