mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Fix update_color enum
This commit is contained in:
parent
e102dc4445
commit
ece2217fed
@ -50,7 +50,7 @@ class UpdateColor:
|
|||||||
Example:
|
Example:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
await app.update_color(chat_id, 1)
|
await app.update_color(chat_id, enums.ProfileColor.RED)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
peer = await self.resolve_peer(chat_id)
|
peer = await self.resolve_peer(chat_id)
|
||||||
@ -58,7 +58,7 @@ class UpdateColor:
|
|||||||
if isinstance(peer, raw.types.InputPeerSelf):
|
if isinstance(peer, raw.types.InputPeerSelf):
|
||||||
await self.invoke(
|
await self.invoke(
|
||||||
raw.functions.account.UpdateColor(
|
raw.functions.account.UpdateColor(
|
||||||
color=color,
|
color=color.value,
|
||||||
background_emoji_id=background_emoji_id
|
background_emoji_id=background_emoji_id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -69,7 +69,7 @@ class UpdateColor:
|
|||||||
r = await self.invoke(
|
r = await self.invoke(
|
||||||
raw.functions.channels.UpdateColor(
|
raw.functions.channels.UpdateColor(
|
||||||
channel=peer,
|
channel=peer,
|
||||||
color=color,
|
color=color.value,
|
||||||
background_emoji_id=background_emoji_id
|
background_emoji_id=background_emoji_id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user