I started using Telethon to integrate a python app with telegram API. I was able to get it started and send a few messages.
The function for sending messages gets an entity as the first argument. So far I was getting this entity from the get_dialogs function which returns list of entities. I know which group I want to send messages to and don't want to go through get_dialogs every time to get the entity.
So which function can I use to give me an entity to pass it to send message? I am expecting there should be a function which gets a group id (or a similar unique feature from the group) as an input and passes me the entity in response. But so far I wasn't able to locate any function.
def send_message(self,
entity,# <--------------- how can I get this entity?
message,
markdown=False,
no_web_page=False):