Add support for integration create/update/delete events

This commit is contained in:
Nadir Chowdhury
2021-06-07 08:28:26 +01:00
committed by GitHub
parent 2ea2693bd7
commit ab6d592f8c
4 changed files with 103 additions and 2 deletions

View File

@ -660,15 +660,48 @@ to handle it, which defaults to print a traceback and ignoring the exception.
.. function:: on_guild_integrations_update(guild)
.. versionadded:: 1.4
Called whenever an integration is created, modified, or removed from a guild.
This requires :attr:`Intents.integrations` to be enabled.
.. versionadded:: 1.4
:param guild: The guild that had its integrations updated.
:type guild: :class:`Guild`
.. function:: on_integration_create(integration)
Called when an integration is created.
This requires :attr:`Intents.integrations` to be enabled.
.. versionadded:: 2.0
:param integration: The integration that was created.
:type integration: :class:`Integration`
.. function:: on_integration_update(integration)
Called when an integration is updated.
This requires :attr:`Intents.integrations` to be enabled.
.. versionadded:: 2.0
:param integration: The integration that was created.
:type integration: :class:`Integration`
.. function:: on_raw_integration_delete(payload)
Called when an integration is deleted.
This requires :attr:`Intents.integrations` to be enabled.
.. versionadded:: 2.0
:param payload: The raw event payload data.
:type payload: :class:`RawIntegrationDeleteEvent`
.. function:: on_webhooks_update(channel)
Called whenever a webhook is created, modified, or removed from a guild channel.
@ -3332,6 +3365,14 @@ RawReactionClearEmojiEvent
.. autoclass:: RawReactionClearEmojiEvent()
:members:
RawIntegrationDeleteEvent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. attributetable:: RawIntegrationDeleteEvent
.. autoclass:: RawIntegrationDeleteEvent()
:members:
PartialWebhookGuild
~~~~~~~~~~~~~~~~~~~~