From 954dd09e18e098ef95047c2bc85c8c58b34a8e29 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Wed, 31 Mar 2021 20:30:41 +0900 Subject: Deprecate Client.logout --- discord/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'discord') diff --git a/discord/client.py b/discord/client.py index 8ea1cf30..7866ffd1 100644 --- a/discord/client.py +++ b/discord/client.py @@ -511,10 +511,13 @@ class Client: await self.http.static_login(token.strip(), bot=bot) self._connection.is_bot = bot + @utils.deprecated('Client.close') async def logout(self): """|coro| Logs out of Discord and closes all connections. + + .. deprecated:: 1.7 .. note:: @@ -675,7 +678,7 @@ class Client: try: loop.run_until_complete(start(*args, **kwargs)) except KeyboardInterrupt: - loop.run_until_complete(logout()) + loop.run_until_complete(close()) # cancel all tasks lingering finally: loop.close() -- cgit v1.2.3