diff --git a/pyrogram/methods/chats/get_forum_topics.py b/pyrogram/methods/chats/get_forum_topics.py index 1620bc4b..b9aeedf9 100644 --- a/pyrogram/methods/chats/get_forum_topics.py +++ b/pyrogram/methods/chats/get_forum_topics.py @@ -32,7 +32,10 @@ class GetForumTopics: async def get_forum_topics( self: "pyrogram.Client", chat_id: Union[int, str], - limit: int = 0 + limit: int = 0, + offset_date: int = 0, + offset_id: int = 0, + offset_topic: int = 0 ) -> Optional[AsyncGenerator["types.ForumTopic", None]]: """Get one or more topic from a chat. @@ -46,6 +49,15 @@ class GetForumTopics: limit (``int``, *optional*): Limits the number of topics to be retrieved. + offset_date (``int``, *optional*): + Date of the last message of the last found topic. + + offset_id (``int``, *optional*): + ID of the last message of the last found topic. + + offset_topic (``int``, *optional*): + ID of the last found topic. + Returns: ``Generator``: On success, a generator yielding :obj:`~pyrogram.types.ForumTopic` objects is returned. @@ -62,7 +74,7 @@ class GetForumTopics: peer = await self.resolve_peer(chat_id) - rpc = raw.functions.channels.GetForumTopics(channel=peer, offset_date=0, offset_id=0, offset_topic=0, limit=limit) + rpc = raw.functions.channels.GetForumTopics(channel=peer, offset_date=offset_date, offset_id=offset_id, offset_topic=offset_topic, limit=limit) r = await self.invoke(rpc, sleep_threshold=-1)