Search code examples
pythontelegramtelethontelegram-api

Telethon: how to change picture in chat?


I want to update logo picture in my chat

await client(EditPhotoRequest(channel='channel name',
                        photo=input_chat_uploaded_photo))

This code works only to channel. Does anyone knows how to do it with chats?


Solution

  • See the API reference on editChatPhoto

    For chats you must pass peers as integer id.

    await client(EditChatPhoto(chat_id,
               input_chat_uploaded_photo))