From b5e880d4129fe5fd425115b3a233238cb391c89c Mon Sep 17 00:00:00 2001 From: Steve C Date: Tue, 19 Apr 2022 01:25:11 -0400 Subject: [PATCH] Add ValueError to PartialEmoji.read docstring --- discord/partial_emoji.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index 9bf9a6e7f..1f3def16c 100644 --- a/discord/partial_emoji.py +++ b/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')