mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Fix SyncWebhook exception case causing attribute errors
This commit is contained in:
@ -156,6 +156,9 @@ class WebhookAdapter:
|
||||
response.status_code,
|
||||
)
|
||||
response.encoding = 'utf-8'
|
||||
# Compatibility with aiohttp
|
||||
response.status = response.status_code # type: ignore
|
||||
|
||||
data = response.text or None
|
||||
if data and response.headers['Content-Type'] == 'application/json':
|
||||
data = json.loads(data)
|
||||
|
Reference in New Issue
Block a user