Browse Source

Fix documentation errors in discord.Invite and on_integration_update

pull/10109/head
Andy 3 years ago
committed by dolfies
parent
commit
db4fd9e883
  1. 12
      discord/invite.py
  2. 2
      docs/api.rst

12
discord/invite.py

@ -331,7 +331,7 @@ class Invite(Hashable):
Attributes Attributes
----------- -----------
max_age: :class:`int` max_age: Optional[:class:`int`]
How long before the invite expires in seconds. How long before the invite expires in seconds.
A value of ``0`` indicates that it doesn't expire. A value of ``0`` indicates that it doesn't expire.
code: :class:`str` code: :class:`str`
@ -343,16 +343,16 @@ class Invite(Hashable):
guild: Optional[Union[:class:`Guild`, :class:`Object`, :class:`PartialInviteGuild`]] guild: Optional[Union[:class:`Guild`, :class:`Object`, :class:`PartialInviteGuild`]]
The guild the invite is for. Can be ``None`` if not a guild invite. The guild the invite is for. Can be ``None`` if not a guild invite.
revoked: :class:`bool` revoked: Optional[:class:`bool`]
Indicates if the invite has been revoked. Indicates if the invite has been revoked.
created_at: :class:`datetime.datetime` created_at: Optional[:class:`datetime.datetime`]
An aware UTC datetime object denoting the time the invite was created. An aware UTC datetime object denoting the time the invite was created.
temporary: :class:`bool` temporary: Optional[:class:`bool`]
Indicates that the invite grants temporary membership. 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` uses: Optional[:class:`int`]
How many times the invite has been used. How many times the invite has been used.
max_uses: :class:`int` max_uses: Optional[:class:`int`]
How many times the invite can be used. How many times the invite can be used.
A value of ``0`` indicates that it has unlimited uses. A value of ``0`` indicates that it has unlimited uses.
inviter: Optional[:class:`User`] inviter: Optional[:class:`User`]

2
docs/api.rst

@ -770,7 +770,7 @@ Integrations
.. versionadded:: 2.0 .. versionadded:: 2.0
:param integration: The integration that was created. :param integration: The integration that was updated.
:type integration: :class:`Integration` :type integration: :class:`Integration`
.. function:: on_guild_integrations_update(guild) .. function:: on_guild_integrations_update(guild)

Loading…
Cancel
Save