GetForumTopicsRequest

Both users and bots may be able to use this request. See code examples.

---functions---
messages.getForumTopics#c68c219a flags:# peer:InputPeer q:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool offset_date:date offset_id:int offset_topic:int limit:int = messages.ForumTopics

Returns

messages.ForumTopics

This type can only be an instance of:

ForumTopics

Parameters

peerInputPeerAnything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.).
offset_datedate
offset_idint
offset_topicint
limitint
qstringThis argument defaults to None and can be omitted.
icon_emoji_idlongThis argument defaults to None and can be omitted.
closedBoolThis argument defaults to None and can be omitted.

Known RPC errors

This request can't cause any RPC error as far as we know.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.messages.GetForumTopicsRequest(
        peer='username',
        offset_date=datetime.datetime(2018, 6, 25),
        offset_id=42,
        offset_topic=42,
        limit=100,
        q='some string here',
        icon_emoji_id=-12398745604826,
        closed=False
    ))
    print(result.stringify())