aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-01-17 19:15:49 -0500
committerRapptz <[email protected]>2020-01-17 19:20:53 -0500
commit7b2c01c48a93a834c5cf9f0858b41f172431ce67 (patch)
tree3348dec9d580befe4222c4889eaac9de45bf37d8 /docs
parentMake CustomActivity.__str__ not raise errors and match the client (diff)
downloaddiscord.py-7b2c01c48a93a834c5cf9f0858b41f172431ce67.tar.xz
discord.py-7b2c01c48a93a834c5cf9f0858b41f172431ce67.zip
Add support for on_invite_create and on_invite_delete
Diffstat (limited to 'docs')
-rw-r--r--docs/api.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst
index a975b624..8c22e0bc 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -622,6 +622,37 @@ to handle it, which defaults to print a traceback and ignoring the exception.
:param user: The user that got unbanned.
:type user: :class:`User`
+.. function:: on_invite_create(invite)
+
+ Called when an :class:`Invite` is created.
+
+ .. versionadded:: 1.3.0
+
+ .. note::
+
+ There is a rare possibility that the :attr:`Invite.guild` and :attr:`Invite.channel`
+ attributes will be of :class:`Object` rather than the respective models.
+
+ :param invite: The invite that was created.
+ :type invite: :class:`Invite`
+
+.. function:: on_invite_delete(invite)
+
+ Called when an :class:`Invite` is deleted.
+
+ .. versionadded:: 1.3.0
+
+ .. note::
+
+ There is a rare possibility that the :attr:`Invite.guild` and :attr:`Invite.channel`
+ attributes will be of :class:`Object` rather than the respective models.
+
+ Outside of those two attributes, the only other attribute guaranteed to be
+ filled by the Discord gateway for this event is :attr:`Invite.code`.
+
+ :param invite: The invite that was deleted.
+ :type invite: :class:`Invite`
+
.. function:: on_group_join(channel, user)
on_group_remove(channel, user)