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 the unpinAllChatMessages method
Browse files Browse the repository at this point in the history
  • Loading branch information
alissonlauffer committed Nov 5, 2020
1 parent 28a8407 commit a2d1925
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions amanobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,11 @@ def unpinChatMessage(self, chat_id):
p = _strip(locals())
return self._api_request('unpinChatMessage', _rectify(p))

def unpinAllChatMessages(self, chat_id):
""" See: https://core.telegram.org/bots/api#unpinallchatmessages """
p = _strip(locals())
return self._api_request('unpinAllChatMessages', _rectify(p))

def leaveChat(self, chat_id):
""" See: https://core.telegram.org/bots/api#leavechat """
p = _strip(locals())
Expand Down
5 changes: 5 additions & 0 deletions amanobot/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ async def unpinChatMessage(self, chat_id):
p = _strip(locals())
return await self._api_request('unpinChatMessage', _rectify(p))

async def unpinAllChatMessages(self, chat_id):
""" See: https://core.telegram.org/bots/api#unpinallchatmessages """
p = _strip(locals())
return await self._api_request('unpinAllChatMessages', _rectify(p))

async def leaveChat(self, chat_id):
""" See: https://core.telegram.org/bots/api#leavechat """
p = _strip(locals())
Expand Down

0 comments on commit a2d1925

Please sign in to comment.