mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
1 parent
1e175f2ab3
commit
0c8d5ee863
3 files changed
+19
-19
No files matched your search
+2
-2
@@ -208,10 +208,10 @@ def _verify_successful_response(response):
|
||||
message = None
|
||||
text = None
|
||||
if response.headers['content-type'] == 'application/json':
|
||||
data = yield from response.json()
|
||||
data = yield from response.json(encoding='utf-8')
|
||||
message = data.get('message')
|
||||
else:
|
||||
text = yield from response.text()
|
||||
text = yield from response.text(encoding='utf-8')
|
||||
|
||||
if code == 403:
|
||||
raise Forbidden(response, message, text)
|
||||
|
||||
Reference in new issue
Block a user