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
I Solved the Problem.
Just specify the id of the group as the target. And it works :) Thanks for the @kekkoilmedikit help