aboutsummaryrefslogtreecommitdiff
path: root/discord/user.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/user.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/user.py')
-rw-r--r--discord/user.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/discord/user.py b/discord/user.py
index 903a0b00..690cbce9 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -150,7 +150,7 @@ class BaseUser(_BaseUser):
return self.avatar_url_as(format=None, size=1024)
def is_avatar_animated(self):
- """Indicates if the user has an animated avatar."""
+ """:class:`bool`: Indicates if the user has an animated avatar."""
return bool(self.avatar and self.avatar.startswith('a_'))
def avatar_url_as(self, *, format=None, static_format='webp', size=1024):
@@ -262,6 +262,11 @@ class BaseUser(_BaseUser):
-----------
message: :class:`Message`
The message to check if you're mentioned in.
+
+ Returns
+ -------
+ :class:`bool`
+ Indicates if the user is mentioned in the message.
"""
if message.mention_everyone:
@@ -706,6 +711,11 @@ class User(BaseUser, discord.abc.Messageable):
This should be rarely called, as this is done transparently for most
people.
+
+ Returns
+ -------
+ :class:`.DMChannel`
+ The channel that was created.
"""
found = self.dm_channel
if found is not None:
@@ -751,7 +761,7 @@ class User(BaseUser, discord.abc.Messageable):
return [User(state=state, data=friend) for friend in mutuals]
def is_friend(self):
- """Checks if the user is your friend.
+ """:class:`bool`: Checks if the user is your friend.
.. note::
@@ -763,7 +773,7 @@ class User(BaseUser, discord.abc.Messageable):
return r.type is RelationshipType.friend
def is_blocked(self):
- """Checks if the user is blocked.
+ """:class:`bool`: Checks if the user is blocked.
.. note::