get_forum_topics_by_id()
- Client.get_forum_topics_by_id()
Get one or more 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. You can also use chat public link in form of t.me/<username> (str).topic_ids (
int
| Iterable ofint
, optional) – Pass a single topic identifier or an iterable of topic ids (as integers) to get the information of the topic themselves.
- Returns:
ForumTopic
| List ofForumTopic
– 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_forum_topics_by_id(chat_id, 12345) # Get more than one topic (list of topics) await app.get_forum_topics_by_id(chat_id, [12345, 12346])
- Raises:
ValueError – In case of invalid arguments.