aboutsummaryrefslogtreecommitdiff
path: root/discord/raw_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/raw_models.py')
-rw-r--r--discord/raw_models.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/discord/raw_models.py b/discord/raw_models.py
index 6c0b0da3..0fdae813 100644
--- a/discord/raw_models.py
+++ b/discord/raw_models.py
@@ -29,6 +29,7 @@ __all__ = (
'RawReactionActionEvent',
'RawReactionClearEvent',
'RawReactionClearEmojiEvent',
+ 'RawIntegrationDeleteEvent',
)
class _RawReprMixin:
@@ -222,3 +223,29 @@ class RawReactionClearEmojiEvent(_RawReprMixin):
self.guild_id = int(data['guild_id'])
except KeyError:
self.guild_id = None
+
+class RawIntegrationDeleteEvent(_RawReprMixin):
+ """Represents the payload for a :func:`on_raw_integration_delete` event.
+
+ .. versionadded:: 2.0
+
+ Attributes
+ -----------
+ integration_id: :class:`int`
+ The ID of the integration that got deleted.
+ application_id: Optional[:class:`int`]
+ The ID of the bot/OAuth2 application for this deleted integration.
+ guild_id: :class:`int`
+ The guild ID where the integration got deleted.
+ """
+
+ __slots__ = ('integration_id', 'application_id', 'guild_id')
+
+ def __init__(self, data):
+ self.integration_id = int(data['id'])
+ self.guild_id = int(data['guild_id'])
+
+ try:
+ self.application_id = int(data['application_id'])
+ except KeyError:
+ self.application_id = None