Change HTTPException to only take a single parameter.

This commit is contained in:
Rapptz
2016-06-12 13:57:05 -04:00
parent 5f9ed8c9d2
commit fa36a449e9
3 changed files with 8 additions and 10 deletions

View File

@ -57,15 +57,15 @@ class HTTPException(DiscordException):
.. attribute:: text
The text of the response if it wasn't JSON. Could be None.
The text of the error. Could be an empty string.
"""
def __init__(self, response, message=None, text=None):
def __init__(self, response, message):
self.response = response
self.text = text
self.text = message
fmt = '{0.reason} (status code: {0.status})'
if message:
if len(message) < 100:
fmt = fmt + ': {1}'
super().__init__(fmt.format(self.response, message))