I'm working on a callback function in telethon, my code is something like this:
def callback(update):
channel_entity = client.get_entity('myzoomg') #Get specific Channel information
update.message.to_id.channel_id == channel_entity.id: #Check message from that specific channel
# do something
client.add_update_handler(callback)
client.idle() # ends with Ctrl+C
client.disconnect()
I want to pass a parameter as a list item to get_entity method, something like this:
channel_entity = client.get_entity(channel_list[0])
This objective normally is accessible by passing channel_list as argument to callback method, but actually callback method just takes update argument as input. My question is how to pass a list to this method?