diff options
| author | Rapptz <[email protected]> | 2019-05-19 19:05:24 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-05-19 19:17:30 -0400 |
| commit | 964b97aa3085a96b499d40b4ed99b443ad17f68c (patch) | |
| tree | 20a9513a56f01ff319fdc9b256d178b4db25a272 | |
| parent | Add asyncio.Task subclass for better __repr__ for events. (diff) | |
| download | discord.py-964b97aa3085a96b499d40b4ed99b443ad17f68c.tar.xz discord.py-964b97aa3085a96b499d40b4ed99b443ad17f68c.zip | |
Add table showing what methods get invite attributes.
| -rw-r--r-- | discord/invite.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/discord/invite.py b/discord/invite.py index ae87ee64..bf1124f6 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -177,7 +177,7 @@ class PartialInviteGuild: return Asset._from_guild_image(self._state, self.id, self.splash, 'splashes', format=format, size=size) class Invite(Hashable): - """Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite. + r"""Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite. Depending on the way this object was created, some of the attributes can have a value of ``None``. @@ -200,6 +200,28 @@ class Invite(Hashable): Returns the invite URL. + The following table illustrates what methods will obtain the attributes: + + +------------------------------------+----------------------------------------------------------+ + | Attribute | Method | + +====================================+==========================================================+ + | :attr:`max_age` | :meth:`abc.GuildChannel.invites`\, :meth:`Guild.invites` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`max_uses` | :meth:`abc.GuildChannel.invites`\, :meth:`Guild.invites` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`created_at` | :meth:`abc.GuildChannel.invites`\, :meth:`Guild.invites` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`temporary` | :meth:`abc.GuildChannel.invites`\, :meth:`Guild.invites` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`uses` | :meth:`abc.GuildChannel.invites`\, :meth:`Guild.invites` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`approximate_member_count` | :meth:`Client.fetch_invite` | + +------------------------------------+----------------------------------------------------------+ + | :attr:`approximate_presence_count` | :meth:`Client.fetch_invite` | + +------------------------------------+----------------------------------------------------------+ + + If it's not in the table above then it is available by all methods. + Attributes ----------- max_age: :class:`int` |