Remove discord.InvalidArgument

This uses TypeError and ValueError instead.
This commit is contained in:
Josh authored and GitHub committed 2022-02-26 01:44:49 -05:00
1 parent 86797dd9ab
commit 2b69b5d545
22 files changed
+342 -176

No files matched your search

+1 -3
View File
@@ -63,8 +63,6 @@ import sys
import types
import warnings
from .errors import InvalidArgument
try:
import orjson
except ModuleNotFoundError:
@@ -562,7 +560,7 @@ def _get_mime_type_for_image(data: bytes):
elif data.startswith(b'RIFF') and data[8:12] == b'WEBP':
return 'image/webp'
else:
raise InvalidArgument('Unsupported image type given')
raise ValueError('Unsupported image type given')
def _bytes_to_base64_data(data: bytes) -> str: