aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorMichael <[email protected]>2020-09-23 00:19:35 -0700
committerGitHub <[email protected]>2020-09-23 03:19:35 -0400
commit93fa46713a198baf08ab1e760be1adfdcb852c97 (patch)
treed73bff9c85cc531d992e77a9e01950f7668731b4 /discord/client.py
parentAdd support for message_reference on Message object (diff)
downloaddiscord.py-93fa46713a198baf08ab1e760be1adfdcb852c97.tar.xz
discord.py-93fa46713a198baf08ab1e760be1adfdcb852c97.zip
Fix and add documentation
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py
index f0c1fee6..9bc5dd12 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -303,7 +303,7 @@ class Client:
return self._connection.voice_clients
def is_ready(self):
- """Specifies if the client's internal cache is ready for use."""
+ """:class:`bool`: Specifies if the client's internal cache is ready for use."""
return self._ready.is_set()
async def _run_event(self, coro, event_name, *args, **kwargs):
@@ -683,7 +683,7 @@ class Client:
# properties
def is_closed(self):
- """Indicates if the websocket connection is closed."""
+ """:class:`bool`: Indicates if the websocket connection is closed."""
return self._closed
@property
@@ -800,6 +800,11 @@ class Client:
Just because you receive a :class:`.abc.GuildChannel` does not mean that
you can communicate in said channel. :meth:`.abc.GuildChannel.permissions_for` should
be used for that.
+
+ Yields
+ ------
+ :class:`.abc.GuildChannel`
+ A channel the client can 'access'.
"""
for guild in self.guilds:
@@ -814,6 +819,11 @@ class Client:
for guild in client.guilds:
for member in guild.members:
yield member
+
+ Yields
+ ------
+ :class:`.Member`
+ A member the client can see.
"""
for guild in self.guilds:
for member in guild.members: