diff --git a/discord/client.py b/discord/client.py index 38f125576..1b6e01e8e 100644 --- a/discord/client.py +++ b/discord/client.py @@ -136,6 +136,14 @@ class Client: r"""Represents a client connection that connects to Discord. This class is used to interact with the Discord WebSocket and API. + .. container:: operations + + .. describe:: async with x + + Asynchronously initialises the client and automatically cleans up. + + .. versionadded:: 2.0 + A number of options can be passed to the :class:`Client`. Parameters diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 57d8af9a5..542496435 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -1220,6 +1220,14 @@ class Bot(BotBase, discord.Client): This class also subclasses :class:`.GroupMixin` to provide the functionality to manage commands. + .. container:: operations + + .. describe:: async with x + + Asynchronously initialises the bot and automatically cleans up. + + .. versionadded:: 2.0 + Attributes ----------- command_prefix @@ -1277,3 +1285,5 @@ class Bot(BotBase, discord.Client): .. versionadded:: 1.7 """ + + pass