Im using Pyrogram and Telegram Client API and i want to write program that will send messages to chats by using Pyrogram send_message() function. How can i get a unique identifier (int) of the target chat?
I tried to use peer id from browser developer console (f12), but when i put it inside the script it gives error: ValueError: Peer id invalid.
2
Answers
I asked ChatGPT to solve my problem and it worked:
From the Docs,
send_message
returns aMessage
object, you can get the group id by the.media_group_id
parameter.