Skip to content

Commit

Permalink
Try to return the service message (when applicable) in the set_chat_p…
Browse files Browse the repository at this point in the history
…hoto

- Documentation Fixes

Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
SpEcHiDe authored and wulan17 committed Sep 7, 2024
1 parent 746bc08 commit 3cbbbb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyrogram/types/user_and_chats/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ async def set_photo(
emoji_background: Union[int, List[int]] = None,
video: Union[str, BinaryIO] = None,
video_start_ts: float = None,
) -> bool:
) -> Union["types.Message", bool]:
"""Bound method *set_photo* of :obj:`~pyrogram.types.Chat`.
Use as a shortcut for:
Expand Down Expand Up @@ -828,7 +828,8 @@ async def set_photo(
The timestamp in seconds of the video frame to use as photo profile preview.
Returns:
``bool``: True on success.
:obj:`~pyrogram.types.Message` | ``bool``: On success, a service message will be returned (when applicable),
otherwise, in case a message object couldn't be returned, True is returned.
Raises:
RPCError: In case of a Telegram RPC error.
Expand Down

0 comments on commit 3cbbbb3

Please sign in to comment.