Bot API 6.8 (#1276)

* Prepare for Bot API 6.8

* Bump after public release

* Bump version, added changelog
This commit is contained in:
Alex Root Junior 2023-08-18 20:18:05 +03:00 committed by GitHub
parent bc0932a745
commit 678b3cfe7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 363 additions and 27 deletions

View file

@ -134,6 +134,7 @@ from ..methods import (
UnhideGeneralForumTopic,
UnpinAllChatMessages,
UnpinAllForumTopicMessages,
UnpinAllGeneralForumTopicMessages,
UnpinChatMessage,
UploadStickerFile,
)
@ -4086,3 +4087,23 @@ class Bot:
language_code=language_code,
)
return await self(call, request_timeout=request_timeout)
async def unpin_all_general_forum_topic_messages(
self,
chat_id: Union[int, str],
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
:param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = UnpinAllGeneralForumTopicMessages(
chat_id=chat_id,
)
return await self(call, request_timeout=request_timeout)