Create Telegram Group Topic using api or Pyrogram

182 views Asked by At

hi i'm working with pyrogram to upload files to group and everything is fine, but now i'm trying to make files more orginzied by uploading each file to sepecific topic in group but i couldn't find any document to create or post to a group topic with api or pyrogram

your help would be really apperciated if you have any documents or answer to question

Create and post data to telegram group topic:

with Client('my_account', api_id, api_hash) as client:
client.send_video(chat_id=username, video=video_path, thumb=thumbnail_path, duration=int(duration),
                  supports_streaming=True)

Where to use topic forum id or create one?

1

There are 1 answers

1
Mahbod On BEST ANSWER

Get topic_id using GetForumTopics method and add use it as message_id like bellow:

client.send_video(chat_id=username, video=video_path, thumb=thumbnail_path, duration=int(duration), supports_streaming=True, reply_to_message_id=topic_id)