Currently I'm using this method that sends text to user but how can I send photo to user with module Telethon
client.send_message(receiver, message.format(user['name'])
Currently I'm using this method that sends text to user but how can I send photo to user with module Telethon
client.send_message(receiver, message.format(user['name'])
As @vlz said in the comment, client.send_file
listed in the documentation is the right method to use:
# note: local paths work just as well
# note: await is needed if used inside async def
await client.send_file(receiver, '/path/to/photo.jpg')