peyk.platforms.telegram.methods.set_chat_photo¶
- async peyk.platforms.telegram.methods.set_chat_photo(self, chat_id: int | str, photo: str | bytes | FilePayload) bool[source]¶
Use this method to set a new profile photo for the chat. Photos can’t be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
- Parameters:
chat_id – Unique identifier for the target chat or username of the target channel in the format @username
photo – New chat photo, uploaded using multipart/form-data
- Returns:
Result returned by Telegram on successful execution.
- Return type:
bool