From ec5d350fbb4e30f3707c7a05922d67a5ee0ddab3 Mon Sep 17 00:00:00 2001 From: privacy lulz <80280930+slyberries@users.noreply.github.com> Date: Wed, 1 Sep 2021 19:39:45 +0000 Subject: [PATCH] Add optimizations in errors --- discord/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/errors.py b/discord/errors.py index bc2398d5..9b33c260 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -143,7 +143,7 @@ class HTTPException(DiscordException): self.code = 0 fmt = '{0.status} {0.reason} (error code: {1})' - if len(self.text): + if self.text: fmt += ': {2}' super().__init__(fmt.format(self.response, self.code, self.text))