diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index bf3337158..2c983ef37 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -770,6 +770,8 @@ async def set_photo( self, *, photo: Union[str, BinaryIO] = None, + emoji: int = None, + emoji_background: Union[int, List[int]] = None, video: Union[str, BinaryIO] = None, video_start_ts: float = None, ) -> bool: @@ -793,6 +795,11 @@ async def set_photo( # Set chat photo using an existing Photo file_id await chat.set_photo(photo=photo.file_id) + # set chat photo with emoji + await chat.set_photo(photo="photo.jpg", emoji=5366316836101038579) + + # set chat photo with emoji and emoji_background + await chat.set_photo(photo="photo.jpg", emoji=5366316836101038579, emoji_background=[0, 0, 0, 0]) # Set chat video using a local file await chat.set_photo(video="video.mp4") @@ -806,6 +813,12 @@ async def set_photo( from your local machine or a binary file-like object with its attribute ".name" set for in-memory uploads. + emoji (``int``, *optional*): + Unique identifier (int) of the emoji to be used as the chat photo. + + emoji_background (``int`` | List of ``int``, *optional*): + hexadecimal colors or List of hexadecimal colors to be used as the chat photo background. + video (``str`` | ``BinaryIO``, *optional*): New chat video. You can pass a :obj:`~pyrogram.types.Video` file_id, a file path to upload a new video from your local machine or a binary file-like object with its attribute @@ -825,6 +838,8 @@ async def set_photo( return await self._client.set_chat_photo( chat_id=self.id, photo=photo, + emoji=emoji, + emoji_background=emoji_background, video=video, video_start_ts=video_start_ts )