diff options
| -rw-r--r-- | bot/bot.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/bot.py b/bot/bot.py index 762d316bf..67a15faba 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -44,9 +44,11 @@ class Bot(commands.Bot): """Close the Discord connection and the aiohttp session, connector, and resolver.""" await super().close() - await self.http_session.close() await self.api_client.close() + if self.http_session: + await self.http_session.close() + if self._connector: await self._connector.close() |