aboutsummaryrefslogtreecommitdiff
path: root/discord/errors.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-06-12 13:57:05 -0400
committerRapptz <[email protected]>2016-06-12 13:57:05 -0400
commitfa36a449e9d33e60cf6b15b58378453870fd33f0 (patch)
tree23939755433cdc2f76dfb50f1609a66f24c9a7c8 /discord/errors.py
parent[commands] Make the CommandError required argument optional again. (diff)
downloaddiscord.py-fa36a449e9d33e60cf6b15b58378453870fd33f0.tar.xz
discord.py-fa36a449e9d33e60cf6b15b58378453870fd33f0.zip
Change HTTPException to only take a single parameter.
Diffstat (limited to 'discord/errors.py')
-rw-r--r--discord/errors.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/errors.py b/discord/errors.py
index 746e1740..7d7bfa02 100644
--- a/discord/errors.py
+++ b/discord/errors.py
@@ -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))