Skip to content

Commit ece2217

Browse files
Fix update_color enum
1 parent e102dc4 commit ece2217

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyrogram/methods/chats/update_color.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ async def update_color(
5050
Example:
5151
.. code-block:: python
5252
53-
await app.update_color(chat_id, 1)
53+
await app.update_color(chat_id, enums.ProfileColor.RED)
5454
"""
5555

5656
peer = await self.resolve_peer(chat_id)
5757

5858
if isinstance(peer, raw.types.InputPeerSelf):
5959
await self.invoke(
6060
raw.functions.account.UpdateColor(
61-
color=color,
61+
color=color.value,
6262
background_emoji_id=background_emoji_id
6363
)
6464
)
@@ -69,7 +69,7 @@ async def update_color(
6969
r = await self.invoke(
7070
raw.functions.channels.UpdateColor(
7171
channel=peer,
72-
color=color,
72+
color=color.value,
7373
background_emoji_id=background_emoji_id
7474
)
7575
)

0 commit comments

Comments
 (0)