Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Bot API 5.0: Add only_if_banned parameter to unbanChatMember
Browse files Browse the repository at this point in the history
  • Loading branch information
alissonlauffer committed Nov 5, 2020
1 parent eaba180 commit d101fc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion amanobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion amanobot/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d101fc1

Please sign in to comment.