Remove discord.InvalidArgument

This uses TypeError and ValueError instead.
This commit is contained in:
Josh
2022-02-26 16:44:49 +10:00
committed by GitHub
parent 86797dd9ab
commit 2b69b5d545
22 changed files with 342 additions and 176 deletions

View File

@ -28,7 +28,6 @@ from typing import Any, Dict, Optional, TYPE_CHECKING, Type, TypeVar, Union
import re
from .asset import Asset, AssetMixin
from .errors import InvalidArgument
from . import utils
# fmt: off
@ -230,6 +229,6 @@ class PartialEmoji(_EmojiTag, AssetMixin):
async def read(self) -> bytes:
if self.is_unicode_emoji():
raise InvalidArgument('PartialEmoji is not a custom emoji')
raise ValueError('PartialEmoji is not a custom emoji')
return await super().read()