Fix update_color enum

This commit is contained in:
KurimuzonAkuma 2023-11-29 23:46:21 +03:00
parent e102dc4445
commit ece2217fed

View File

@ -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
) )
) )