from telethon import TelegramClient, events, sync
client.start()
destination_group_invite_link=grouplink #t.me/xxxxxxx
entity=client.get_entity(destination_group_invite_link)
client.send_file(entity=entity, message="xxxx")
With this code I can send message to public linked group. But how do I send a message to a group with a private link?
#t.me/+xxxxxxxxx
3
Answers
Here are all my codes. I don't understand how to do what you said man. @kekkoilmedikit
first, you need to join the group, to do so:
if you are already inside of the group:
code with ImportChatInviteRequest:
code with CheckChatInviteRequest: [for this you need the group link, specifically the hash, to find it you need to to replace "https://t.me/+" with a blank space]
I Solved the Problem.
Just specify the id of the group as the target. And it works 🙂 Thanks for the @kekkoilmedikit help