fix: make sure `Client._http` is not a string
@@ -486,6 +486,7 @@ class Client:
self._websocket._closing_lock.set() # Toggles the "ready-to-shutdown" state for the bot.
# And subsequently, the processes will close itself.
+ if isinstance(self._http, HTTPClient):
await self._http._req._session.close() # Closes the HTTP session associated with the client.
async def _login(self) -> None:
@@ -1620,6 +1621,7 @@ class Client:
async def _logout(self) -> None:
await self._websocket.close()
+ if isinstance(self._http, HTTPClient):
await self._http._req.close()
async def wait_for(
