aboutsummaryrefslogtreecommitdiff
path: root/discord/invite.py
diff options
context:
space:
mode:
authorNCPlayz <[email protected]>2019-05-18 06:04:54 -0400
committerRapptz <[email protected]>2019-06-07 19:27:46 -0400
commit3c9bcc285147154a2980f6e661efdfa676672b6a (patch)
tree657bafa75e4e0d45361e394443ea932ad70e86a7 /discord/invite.py
parentAdded comment for/redo system information (diff)
downloaddiscord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.tar.xz
discord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.zip
Improve documentation
Diffstat (limited to 'discord/invite.py')
-rw-r--r--discord/invite.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/discord/invite.py b/discord/invite.py
index b487162c..d91d06e6 100644
--- a/discord/invite.py
+++ b/discord/invite.py
@@ -71,12 +71,12 @@ class PartialInviteChannel(namedtuple('PartialInviteChannel', 'id name type')):
@property
def mention(self):
- """:class:`str` : The string that allows you to mention the channel."""
+ """:class:`str`: The string that allows you to mention the channel."""
return '<#%s>' % self.id
@property
def created_at(self):
- """Returns the channel's creation time in UTC."""
+ """:class:`datetime.datetime`: Returns the channel's creation time in UTC."""
return snowflake_time(self.id)
class PartialInviteGuild:
@@ -146,7 +146,7 @@ class PartialInviteGuild:
@property
def created_at(self):
- """Returns the guild's creation time in UTC."""
+ """:class:`datetime.datetime`: Returns the guild's creation time in UTC."""
return snowflake_time(self.id)
@property
@@ -155,7 +155,7 @@ class PartialInviteGuild:
return self.icon_url_as()
def icon_url_as(self, *, format='webp', size=1024):
- """:class:`Asset`: The same operation as :meth:`Guild.icon_url_as`."""
+ """The same operation as :meth:`Guild.icon_url_as`."""
return Asset._from_guild_image(self._state, self.id, self.icon, 'icons', format=format, size=size)
@property
@@ -164,7 +164,7 @@ class PartialInviteGuild:
return self.banner_url_as()
def banner_url_as(self, *, format='webp', size=2048):
- """:class:`Asset`: The same operation as :meth:`Guild.banner_url_as`."""
+ """The same operation as :meth:`Guild.banner_url_as`."""
return Asset._from_guild_image(self._state, self.id, self.banner, 'banners', format=format, size=size)
@property
@@ -173,7 +173,7 @@ class PartialInviteGuild:
return self.splash_url_as()
def splash_url_as(self, *, format='webp', size=2048):
- """:class:`Asset`: The same operation as :meth:`Guild.splash_url_as`."""
+ """The same operation as :meth:`Guild.splash_url_as`."""
return Asset._from_guild_image(self._state, self.id, self.splash, 'splashes', format=format, size=size)
class Invite(Hashable):
@@ -232,11 +232,11 @@ class Invite(Hashable):
The guild the invite is for.
revoked: :class:`bool`
Indicates if the invite has been revoked.
- created_at: `datetime.datetime`
+ created_at: :class:`datetime.datetime`
A datetime object denoting the time the invite was created.
temporary: :class:`bool`
Indicates that the invite grants temporary membership.
- If True, members who joined via this invite will be kicked upon disconnect.
+ If ``True``, members who joined via this invite will be kicked upon disconnect.
uses: :class:`int`
How many times the invite has been used.
max_uses: :class:`int`
@@ -303,12 +303,12 @@ class Invite(Hashable):
@property
def id(self):
- """Returns the proper code portion of the invite."""
+ """:class:`str`: Returns the proper code portion of the invite."""
return self.code
@property
def url(self):
- """A property that retrieves the invite URL."""
+ """:class:`str`: A property that retrieves the invite URL."""
return 'http://discord.gg/' + self.code
async def delete(self, *, reason=None):