Chat.set_photo()

Chat.set_photo()

Bound method set_photo of Chat.

Use as a shortcut for:

client.set_chat_photo(
    chat_id=chat_id,
    photo=photo
)

Example

chat.set_photo("photo.png")
Parameters

photo (str) – New chat photo. You can pass a Photo id or a file path to upload a new photo.

Returns

bool – True on success.

Raises
  • RPCError – In case of a Telegram RPC error.

  • ValueError – if a chat_id belongs to user.