From 1066f42f1f73ba3e98b2572957738bbf4b21bab2 Mon Sep 17 00:00:00 2001
From: Xua <17090652+XuaTheGrate@users.noreply.github.com>
Date: Thu, 1 Oct 2020 21:42:32 +1300
Subject: [PATCH] Add intents to event reference

---
 docs/api.rst | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/docs/api.rst b/docs/api.rst
index d697b4f3c..063c9f428 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -262,6 +262,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     If the ``channel`` is a :class:`TextChannel` then the ``user`` parameter
     is a :class:`Member`, otherwise it is a :class:`User`.
 
+    This requires :attr:`Intents.typing` to be enabled.
+
     :param channel: The location where the typing originated from.
     :type channel: :class:`abc.Messageable`
     :param user: The user that started typing.
@@ -273,6 +275,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when a :class:`Message` is created and sent.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     .. warning::
 
         Your bot's own messages and private messages are sent through this
@@ -294,6 +298,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     If this occurs increase the :attr:`Client.max_messages` attribute
     or use the :func:`on_raw_message_delete` event instead.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param message: The deleted message.
     :type message: :class:`Message`
 
@@ -309,6 +315,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     If this occurs increase the :attr:`Client.max_messages` attribute
     or use the :func:`on_raw_bulk_message_delete` event instead.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param messages: The messages that have been deleted.
     :type messages: List[:class:`Message`]
 
@@ -320,6 +328,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     If the message is found in the message cache,
     it can be accessed via :attr:`RawMessageDeleteEvent.cached_message`
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawMessageDeleteEvent`
 
@@ -331,6 +341,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     If the messages are found in the message cache,
     they can be accessed via :attr:`RawBulkMessageDeleteEvent.cached_messages`
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawBulkMessageDeleteEvent`
 
@@ -355,6 +367,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     - The message's embeds were suppressed or unsuppressed.
     - A call message has received an update to its participants or ending time.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param before: The previous version of the message.
     :type before: :class:`Message`
     :param after: The current version of the message.
@@ -376,6 +390,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     denotes an "embed" only edit, which is an edit in which only the embeds are updated by the Discord
     embed server.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawMessageUpdateEvent`
 
@@ -389,6 +405,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
         To get the :class:`Message` being reacted, access it via :attr:`Reaction.message`.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param reaction: The current state of the reaction.
     :type reaction: :class:`Reaction`
     :param user: The user who added the reaction.
@@ -399,6 +417,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a message has a reaction added. Unlike :func:`on_reaction_add`, this is
     called regardless of the state of the internal message cache.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawReactionActionEvent`
 
@@ -412,6 +432,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
         To get the message being reacted, access it via :attr:`Reaction.message`.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param reaction: The current state of the reaction.
     :type reaction: :class:`Reaction`
     :param user: The user who added the reaction.
@@ -422,6 +444,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a message has a reaction removed. Unlike :func:`on_reaction_remove`, this is
     called regardless of the state of the internal message cache.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawReactionActionEvent`
 
@@ -431,6 +455,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     if the message is not found in the internal message cache, then this event
     will not be called. Consider using :func:`on_raw_reaction_clear` instead.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param message: The message that had its reactions cleared.
     :type message: :class:`Message`
     :param reactions: The reactions that were removed.
@@ -441,6 +467,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a message has all its reactions removed. Unlike :func:`on_reaction_clear`,
     this is called regardless of the state of the internal message cache.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     :param payload: The raw event payload data.
     :type payload: :class:`RawReactionClearEvent`
 
@@ -450,6 +478,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     if the message is not found in the internal message cache, then this event
     will not be called. Consider using :func:`on_raw_reaction_clear_emoji` instead.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     .. versionadded:: 1.3
 
     :param reaction: The reaction that got cleared.
@@ -460,6 +490,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a message has a specific reaction removed from it. Unlike :func:`on_reaction_clear_emoji` this is called
     regardless of the state of the internal message cache.
 
+    This requires :attr:`Intents.reactions` to be enabled.
+
     .. versionadded:: 1.3
 
     :param payload: The raw event payload data.
@@ -470,6 +502,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever a private channel is deleted or created.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param channel: The private channel that got created or deleted.
     :type channel: :class:`abc.PrivateChannel`
 
@@ -477,6 +511,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever a private group DM is updated. e.g. changed name or topic.
 
+    This requires :attr:`Intents.messages` to be enabled.
+
     :param before: The updated group channel's old info.
     :type before: :class:`GroupChannel`
     :param after: The updated group channel's new info.
@@ -498,6 +534,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Note that you can get the guild from :attr:`~abc.GuildChannel.guild`.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param channel: The guild channel that got created or deleted.
     :type channel: :class:`abc.GuildChannel`
 
@@ -505,6 +543,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever a guild channel is updated. e.g. changed name, topic, permissions.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param before: The updated guild channel's old info.
     :type before: :class:`abc.GuildChannel`
     :param after: The updated guild channel's new info.
@@ -514,6 +554,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever a message is pinned or unpinned from a guild channel.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param channel: The guild channel that had its pins updated.
     :type channel: :class:`abc.GuildChannel`
     :param last_pin: The latest message that was pinned as a naive datetime in UTC. Could be ``None``.
@@ -525,6 +567,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever an integration is created, modified, or removed from a guild.
 
+    This requires :attr:`Intents.integrations` to be enabled.
+
     :param guild: The guild that had its integrations updated.
     :type guild: :class:`Guild`
 
@@ -532,6 +576,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called whenever a webhook is created, modified, or removed from a guild channel.
 
+    This requires :attr:`Intents.webhooks` to be enabled.
+
     :param channel: The channel that had its webhooks updated.
     :type channel: :class:`abc.GuildChannel`
 
@@ -540,6 +586,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when a :class:`Member` leaves or joins a :class:`Guild`.
 
+    This requires :attr:`Intents.members` to be enabled.
+
     :param member: The member who joined or left.
     :type member: :class:`Member`
 
@@ -554,6 +602,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     - nickname
     - roles
 
+    This requires :attr:`Intents.members` to be enabled.
+
     :param before: The updated member's old info.
     :type before: :class:`Member`
     :param after: The updated member's updated info.
@@ -569,6 +619,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     - username
     - discriminator
 
+    This requires :attr:`Intents.members` to be enabled.
+
     :param before: The updated user's old info.
     :type before: :class:`User`
     :param after: The updated user's updated info.
@@ -579,6 +631,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a :class:`Guild` is either created by the :class:`Client` or when the
     :class:`Client` joins a guild.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param guild: The guild that was joined.
     :type guild: :class:`Guild`
 
@@ -596,6 +650,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     In order for this event to be invoked then the :class:`Client` must have
     been part of the guild to begin with. (i.e. it is part of :attr:`Client.guilds`)
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param guild: The guild that got removed.
     :type guild: :class:`Guild`
 
@@ -608,6 +664,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     - Changed AFK timeout
     - etc
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param before: The guild prior to being updated.
     :type before: :class:`Guild`
     :param after: The guild after being updated.
@@ -620,6 +678,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     To get the guild it belongs to, use :attr:`Role.guild`.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param role: The role that was created or deleted.
     :type role: :class:`Role`
 
@@ -627,6 +687,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when a :class:`Role` is changed guild-wide.
 
+    This requires :attr:`Intents.guilds` to be enabled.
+
     :param before: The updated role's old info.
     :type before: :class:`Role`
     :param after: The updated role's updated info.
@@ -636,6 +698,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when a :class:`Guild` adds or removes :class:`Emoji`.
 
+    This requires :attr:`Intents.emojis` to be enabled.
+
     :param guild: The guild who got their emojis updated.
     :type guild: :class:`Guild`
     :param before: A list of emojis before the update.
@@ -649,6 +713,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     Called when a guild becomes available or unavailable. The guild must have
     existed in the :attr:`Client.guilds` cache.
 
+    This requires :attr:`Intents.emojis` to be enabled.
+
     :param guild: The :class:`Guild` that has changed availability.
 
 .. function:: on_voice_state_update(member, before, after)
@@ -662,6 +728,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
     - A member is muted or deafened by their own accord.
     - A member is muted or deafened by a guild administrator.
 
+    This requires :attr:`Intents.voice_states` to be enabled.
+
     :param member: The member whose voice states changed.
     :type member: :class:`Member`
     :param before: The voice state prior to the changes.
@@ -673,6 +741,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when user gets banned from a :class:`Guild`.
 
+    This requires :attr:`Intents.bans` to be enabled.
+
     :param guild: The guild the user got banned from.
     :type guild: :class:`Guild`
     :param user: The user that got banned.
@@ -684,6 +754,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
 
     Called when a :class:`User` gets unbanned from a :class:`Guild`.
 
+    This requires :attr:`Intents.bans` to be enabled.
+
     :param guild: The guild the user got unbanned from.
     :type guild: :class:`Guild`
     :param user: The user that got unbanned.
@@ -701,6 +773,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
         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.
 
+    This requires :attr:`Intents.invites` to be enabled.
+
     :param invite: The invite that was created.
     :type invite: :class:`Invite`
 
@@ -719,6 +793,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
         Outside of those two attributes, the only other attribute guaranteed to be
         filled by the Discord gateway for this event is :attr:`Invite.code`.
 
+    This requires :attr:`Intents.invites` to be enabled.
+
     :param invite: The invite that was deleted.
     :type invite: :class:`Invite`