aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVexs <[email protected]>2019-05-14 16:51:50 -0500
committerRapptz <[email protected]>2019-05-14 19:13:48 -0400
commitbf5b267c5586a59b16ae8af0038cb628667333d5 (patch)
treec7d88281a339b0d614791f3fa9b78a04508923a8
parentAdded note to Emoji.user (diff)
downloaddiscord.py-bf5b267c5586a59b16ae8af0038cb628667333d5.tar.xz
discord.py-bf5b267c5586a59b16ae8af0038cb628667333d5.zip
Correct the documentation for methods and properties that return Assets
-rw-r--r--discord/channel.py2
-rw-r--r--discord/guild.py12
-rw-r--r--discord/invite.py6
-rw-r--r--discord/user.py12
-rw-r--r--discord/webhook.py12
5 files changed, 22 insertions, 22 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 73205cfe..1fc10224 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -1030,7 +1030,7 @@ class GroupChannel(discord.abc.Messageable, Hashable):
@property
def icon_url(self):
- """:class:`Asset`: Returns the channel's icon asset if available."""
+ """:class:`Asset`: Returns the channel's icon asset."""
return Asset._from_icon(self._state, self, 'channel')
@property
diff --git a/discord/guild.py b/discord/guild.py
index 3dd28533..fc59ce70 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -418,11 +418,11 @@ class Guild(Hashable):
@property
def icon_url(self):
- """Returns the URL version of the guild's icon. Returns an empty string if it has no icon."""
+ """:class:`Asset`: Returns the guild's icon asset."""
return self.icon_url_as()
def icon_url_as(self, *, format='webp', size=1024):
- """Returns a friendly URL version of the guild's icon. Returns an empty string if it has no icon.
+ """Returns a :class:`Asset`: for the guild's icon.
The format must be one of 'webp', 'jpeg', 'jpg', or 'png'. The
size must be a power of 2 between 16 and 4096.
@@ -448,11 +448,11 @@ class Guild(Hashable):
@property
def banner_url(self):
- """Returns the URL version of the guild's banner. Returns an empty string if it has no banner."""
+ """:class:`Asset`: Returns the guild's banner asset."""
return self.banner_url_as()
def banner_url_as(self, *, format='webp', size=2048):
- """Returns a friendly URL version of the guild's banner. Returns an empty string if it has no banner.
+ """Returns a :class:`Asset`: for the guild's banner.
The format must be one of 'webp', 'jpeg', or 'png'. The
size must be a power of 2 between 16 and 4096.
@@ -478,11 +478,11 @@ class Guild(Hashable):
@property
def splash_url(self):
- """Returns the URL version of the guild's invite splash. Returns an empty string if it has no splash."""
+ """:class:`Asset`: Returns the guild's invite splash asset."""
return self.splash_url_as()
def splash_url_as(self, *, format='webp', size=2048):
- """Returns a friendly URL version of the guild's invite splash. Returns an empty string if it has no splash.
+ """Returns a :class:`Asset`: for the guild's invite splash.
The format must be one of 'webp', 'jpeg', 'jpg', or 'png'. The
size must be a power of 2 between 16 and 4096.
diff --git a/discord/invite.py b/discord/invite.py
index d378c3d7..ae87ee64 100644
--- a/discord/invite.py
+++ b/discord/invite.py
@@ -151,7 +151,7 @@ class PartialInviteGuild:
@property
def icon_url(self):
- """Returns the URL version of the guild's icon. Returns an empty string if it has no icon."""
+ """:class:`Asset`: Returns the guild's icon asset."""
return self.icon_url_as()
def icon_url_as(self, *, format='webp', size=1024):
@@ -160,7 +160,7 @@ class PartialInviteGuild:
@property
def banner_url(self):
- """Returns the URL version of the guild's banner. Returns an empty string if it has no banner."""
+ """:class:`Asset`: Returns the guild's banner asset."""
return self.banner_url_as()
def banner_url_as(self, *, format='webp', size=2048):
@@ -169,7 +169,7 @@ class PartialInviteGuild:
@property
def splash_url(self):
- """Returns the URL version of the guild's invite splash. Returns an empty string if it has no splash."""
+ """:class:`Asset`: Returns the guild's invite splash asset."""
return self.splash_url_as()
def splash_url_as(self, *, format='webp', size=2048):
diff --git a/discord/user.py b/discord/user.py
index a47e5351..4bd942d0 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -114,10 +114,10 @@ class BaseUser(_BaseUser):
@property
def avatar_url(self):
- """Returns a friendly URL version of the avatar the user has.
+ """Returns a :class:`Asset`: for the avatar the user has.
- If the user does not have a traditional avatar, their default
- avatar URL is returned instead.
+ If the user does not have a traditional avatar, an asset for
+ the default avatar is returned instead.
This is equivalent to calling :meth:`avatar_url_as` with
the default parameters (i.e. webp/gif detection and a size of 1024).
@@ -129,10 +129,10 @@ class BaseUser(_BaseUser):
return bool(self.avatar and self.avatar.startswith('a_'))
def avatar_url_as(self, *, format=None, static_format='webp', size=1024):
- """Returns a friendly URL version of the avatar the user has.
+ """Returns a :class:`Asset`: for the avatar the user has.
- If the user does not have a traditional avatar, their default
- avatar URL is returned instead.
+ If the user does not have a traditional avatar, an asset for
+ the default avatar is returned instead.
The format must be one of 'webp', 'jpeg', 'jpg', 'png' or 'gif', and
'gif' is only valid for animated avatars. The size must be a power of 2
diff --git a/discord/webhook.py b/discord/webhook.py
index 716963b9..88406937 100644
--- a/discord/webhook.py
+++ b/discord/webhook.py
@@ -523,10 +523,10 @@ class Webhook:
@property
def avatar_url(self):
- """Returns a friendly URL version of the avatar the webhook has.
+ """Returns a :class:`Asset`: for the avatar the webhook has.
- If the webhook does not have a traditional avatar, their default
- avatar URL is returned instead.
+ If the webhook does not have a traditional avatar, an asset for
+ the default avatar is returned instead.
This is equivalent to calling :meth:`avatar_url_as` with the
default parameters.
@@ -534,10 +534,10 @@ class Webhook:
return self.avatar_url_as()
def avatar_url_as(self, *, format=None, size=1024):
- """Returns a friendly URL version of the avatar the webhook has.
+ """Returns a :class:`Asset`: for the avatar the webhook has.
- If the webhook does not have a traditional avatar, their default
- avatar URL is returned instead.
+ If the webhook does not have a traditional avatar, an asset for
+ the default avatar is returned instead.
The format must be one of 'jpeg', 'jpg', or 'png'.
The size must be a power of 2 between 16 and 1024.