get_direct_messages_topics()¶
- Client.get_direct_messages_topics()¶
Get one or more topic from a direct messages channel 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
DirectMessagesTopicobjects.)
Example
# Iterate through all topics async for topic in app.get_direct_messages_topics(chat_id): print(topic)