From 964b97aa3085a96b499d40b4ed99b443ad17f68c Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 19 May 2019 19:05:24 -0400 Subject: [PATCH] Add table showing what methods get invite attributes. --- discord/invite.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/discord/invite.py b/discord/invite.py index ae87ee649..bf1124f6f 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`