get_forum_topics()#

Client.get_forum_topics()#

Get one or more topic from a chat.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • limit (int, optional) – Limits the number of topics to be retrieved. By default, no limit is applied and all topics are returned.

Returns:

Generator – A generator yielding ForumTopic objects.

Example

# Iterate through all topics
async for topic in app.get_forum_topics(chat_id):
    print(topic)