We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to get Forum list by mtproto API "channels.getForumTopics"
let resolvedPeer = { chats: [] }; try { resolvedPeer = await api.call('contacts.resolveUsername', { username, }); } catch (error) { console.warn('Error for get chat', username); } const chat = resolvedPeer.chats.find((chat) => (chat.id === resolvedPeer.peer.channel_id));
const inputChannel = { _: 'inputChannel', channel_id: chat.id, access_hash: chat.access_hash, }; const forumTopics = await api.call('channels.getForumTopics', { channel: inputChannel, offset_date: 0, offset_id: 0, offset_topic: 0, limit: 100, q: '', });
It always return "Cannot read properties of undefined (reading 'call')"
Expected behavior To get example ForumTopic that must be returned i used Telethon Python Library.
from telethon.tl.functions.channels import GetForumTopicsRequest chatEntity = client.get_entity(chat_name) forums = client(GetForumTopicsRequest(chatEntity, 0, 0, 0, 1000)) print(forums)
ForumTopic(id=3, date=datetime.datetime(2023, 2, 27, 13, 29, 19, tzinfo=datetime.timezone.utc), title='Сделки Bybit', icon_color=16766590, top_message=611, read_inbox_max_id=611, read_outbox_max_id=611, unread_count=0, unread_mentions_count=0, unread_reactions_count=0, from_id=PeerUser(user_id=5228976776), notify_settings=PeerNotifySettings(show_previews=None, silent=None, mute_until=None, ios_sound=None, android_sound=None, other_sound=None), my=False, closed=False, pinned=True, short=False, hidden=False, icon_emoji_ id=5269673041079574154, draft=None)
Docs https://core.telegram.org/api/forum#forum-topics https://core.telegram.org/constructor/messages.forumTopics
The text was updated successfully, but these errors were encountered:
It's happening cuz current supported layer(so named api version of telegram) is 139, while forums was added in layer 148
Sorry, something went wrong.
No branches or pull requests
Try to get Forum list by mtproto API "channels.getForumTopics"
It always return "Cannot read properties of undefined (reading 'call')"
Expected behavior
To get example ForumTopic that must be returned i used Telethon Python Library.
ForumTopic(id=3, date=datetime.datetime(2023, 2, 27, 13, 29, 19, tzinfo=datetime.timezone.utc), title='Сделки Bybit', icon_color=16766590, top_message=611,
read_inbox_max_id=611, read_outbox_max_id=611, unread_count=0, unread_mentions_count=0, unread_reactions_count=0, from_id=PeerUser(user_id=5228976776), notify_settings=PeerNotifySettings(show_previews=None, silent=None, mute_until=None, ios_sound=None, android_sound=None, other_sound=None), my=False, closed=False, pinned=True, short=False, hidden=False, icon_emoji_
id=5269673041079574154, draft=None)
Docs
https://core.telegram.org/api/forum#forum-topics
https://core.telegram.org/constructor/messages.forumTopics
The text was updated successfully, but these errors were encountered: