get_direct_messages_topics_by_id()¶
- Client.get_direct_messages_topics_by_id()¶
Get one or more direct message topic from a chat by using topic identifiers.
Usable by Users Bots
- Parameters:¶
chat_id (``int`` | ``str``) – Unique identifier (int) or username (str) of the target chat.
topic_ids (``int`` | Iterable of ``int``, *optional*) – Pass a single topic identifier or an iterable of topic ids (as integers) to get the information of the topic themselves.
- Returns:¶
:obj:`~pyrogram.types.DirectMessagesTopic` | List of :obj:`~pyrogram.types.DirectMessagesTopic` (In case *topic_ids was not*)
a list, a single topic is returned, otherwise a list of topics is returned.
Example
# Get one topic await app.get_direct_messages_topics_by_id(chat_id, 12345) # Get more than one topic (list of topics) await app.get_direct_messages_topics_by_id(chat_id, [12345, 12346])