@@ -32,7 +32,10 @@ class GetForumTopics:
3232 async def get_forum_topics (
3333 self : "pyrogram.Client" ,
3434 chat_id : Union [int , str ],
35- limit : int = 0
35+ limit : int = 0 ,
36+ offset_date : int = 0 ,
37+ offset_id : int = 0 ,
38+ offset_topic : int = 0
3639 ) -> Optional [AsyncGenerator ["types.ForumTopic" , None ]]:
3740 """Get one or more topic from a chat.
3841
@@ -46,6 +49,15 @@ async def get_forum_topics(
4649 limit (``int``, *optional*):
4750 Limits the number of topics to be retrieved.
4851
52+ offset_date (``int``, *optional*):
53+ Date of the last message of the last found topic.
54+
55+ offset_id (``int``, *optional*):
56+ ID of the last message of the last found topic.
57+
58+ offset_topic (``int``, *optional*):
59+ ID of the last found topic.
60+
4961 Returns:
5062 ``Generator``: On success, a generator yielding :obj:`~pyrogram.types.ForumTopic` objects is returned.
5163
@@ -62,7 +74,7 @@ async def get_forum_topics(
6274
6375 peer = await self .resolve_peer (chat_id )
6476
65- rpc = raw .functions .channels .GetForumTopics (channel = peer , offset_date = 0 , offset_id = 0 , offset_topic = 0 , limit = limit )
77+ rpc = raw .functions .channels .GetForumTopics (channel = peer , offset_date = offset_date , offset_id = offset_id , offset_topic = offset_topic , limit = limit )
6678
6779 r = await self .invoke (rpc , sleep_threshold = - 1 )
6880
0 commit comments