You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""A factory method that creates a :class:`Intents` with everything enabled
554
-
except :attr:`presences`and :attr:`members`.
554
+
except :attr:`presences`, :attr:`members`, and :attr:`guild_messages`.
555
555
"""
556
556
self=cls.all()
557
557
self.presences=False
558
558
self.members=False
559
+
self.guild_messages=False
559
560
returnself
560
561
561
562
@flag_value
@@ -772,6 +773,13 @@ def messages(self):
772
773
- :func:`on_reaction_add` (both guilds and DMs)
773
774
- :func:`on_reaction_remove` (both guilds and DMs)
774
775
- :func:`on_reaction_clear` (both guilds and DMs)
776
+
777
+
Since this includes :attr:`guild_messages`, this intent is privileged. For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.
778
+
779
+
.. note::
780
+
781
+
Currently, this requires opting in explicitly via the developer portal as well.
782
+
Bots in over 100 guilds will need to apply to Discord for verification.
775
783
"""
776
784
return (1<<9) | (1<<12)
777
785
@@ -799,6 +807,13 @@ def guild_messages(self):
799
807
- :func:`on_reaction_add` (only for guilds)
800
808
- :func:`on_reaction_remove` (only for guilds)
801
809
- :func:`on_reaction_clear` (only for guilds)
810
+
811
+
For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.
812
+
813
+
.. note::
814
+
815
+
Currently, this requires opting in explicitly via the developer portal as well.
816
+
Bots in over 100 guilds will need to apply to Discord for verification.
Copy file name to clipboardExpand all lines: docs/intents.rst
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ In version 1.5 comes the introduction of :class:`Intents`. This is a radical cha
11
11
12
12
These intents are passed to the constructor of :class:`Client` or its subclasses (:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, :class:`~.Bot`) with the ``intents`` argument.
13
13
14
-
If intents are not passed, then the library defaults to every intent being enabled except the privileged intents, currently :attr:`Intents.members`and :attr:`Intents.presences`.
14
+
If intents are not passed, then the library defaults to every intent being enabled except the privileged intents, currently :attr:`Intents.members`, :attr:`Intents.presences`, and :attr:`Intents.guild_messages`.
15
15
16
16
What intents are needed?
17
17
--------------------------
@@ -34,7 +34,7 @@ For example, if you want a bot that functions without spammy events like presenc
Note that this doesn't enable :attr:`Intents.members` since it's a privileged intent.
37
+
Note that this doesn't enable :attr:`Intents.members` or :attr:`Intents.guild_messages` since they are privileged intents.
38
38
39
39
Another example showing a bot that only deals with messages and guild information:
40
40
@@ -76,7 +76,7 @@ A privileged intent is one that requires you to go to the developer portal and m
76
76
77
77
.. warning::
78
78
79
-
Enabling privileged intents when your bot is in over 100 guilds requires going through `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_. If your bot is already verified and you would like to enable a privileged intent you must go through `Discord support <https://dis.gd/contact>`_ and talk to them about it.
79
+
Enabling privileged intents when your bot is in over 100 guilds requires going through `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_.
80
80
81
81
.. note::
82
82
@@ -107,6 +107,19 @@ Member Intent
107
107
- Whether you want to request the guild member list through :meth:`Guild.chunk` or :meth:`Guild.fetch_members`.
108
108
- Whether you want high accuracy member cache under :attr:`Guild.members`.
109
109
110
+
.. _need_message_content_intent:
111
+
112
+
Message Content Intent
113
+
++++++++++++++++
114
+
115
+
- Whether you have a message based command system using ext.commands
116
+
- Whether you use the :func:`on_message` event for anything, such as auto-moderation.
117
+
- Whether you track message edits or deletions using :func:`on_message_edit`, :func:`on_message_delete`, :func:`on_raw_message_edit`, :func:`on_raw_message_delete`.
118
+
- Whether you use any reaction related events, such as :func:`on_reaction_add`, :func:`on_reaction_remove`, and :func:`on_reaction_clear`
119
+
120
+
.. note::
121
+
This only applies to :attr:`Intents.guild_messages`, not :attr:`Intents.dm_messages`. The bot can still receive message contents in DMs, when mentioned in guild messages, and for its own guild messages.
0 commit comments