mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-23 00:42:56 +00:00
Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user