Browse Source

Add ValueError to PartialEmoji.read docstring

pull/10109/head
Steve C 3 years ago
committed by dolfies
parent
commit
b5e880d412
  1. 20
      discord/partial_emoji.py

20
discord/partial_emoji.py

@ -233,6 +233,26 @@ class PartialEmoji(_EmojiTag, AssetMixin):
return f'{Asset.BASE}/emojis/{self.id}.{fmt}'
async def read(self) -> bytes:
"""|coro|
Retrieves the content of this asset as a :class:`bytes` object.
Raises
------
DiscordException
There was no internal connection state.
HTTPException
Downloading the asset failed.
NotFound
The asset was deleted.
ValueError
The PartialEmoji is not a custom emoji.
Returns
-------
:class:`bytes`
The content of the asset.
"""
if self.is_unicode_emoji():
raise ValueError('PartialEmoji is not a custom emoji')

Loading…
Cancel
Save