mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
Add ValueError to PartialEmoji.read docstring
This commit is contained in:
parent
2e02f618f0
commit
fd5886a058
@ -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…
x
Reference in New Issue
Block a user