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
549
-
except :attr:`presences`and :attr:`members`.
549
+
except :attr:`presences`, :attr:`members`, and :attr:`guild_messages`.
550
550
"""
551
551
self=cls.all()
552
552
self.presences=False
553
553
self.members=False
554
+
self.guild_messages=False
554
555
returnself
555
556
556
557
@flag_value
@@ -767,6 +768,13 @@ def messages(self):
767
768
- :func:`on_reaction_add` (both guilds and DMs)
768
769
- :func:`on_reaction_remove` (both guilds and DMs)
769
770
- :func:`on_reaction_clear` (both guilds and DMs)
771
+
772
+
Since this includes :attr:`guild_messages`, this intent is privileged. For more information go to the :ref:`message intent documentation <need_message_intent>`.
773
+
774
+
.. note::
775
+
776
+
Currently, this requires opting in explicitly via the developer portal as well.
777
+
Bots in over 100 guilds will need to apply to Discord for verification.
770
778
"""
771
779
return (1<<9) | (1<<12)
772
780
@@ -794,6 +802,13 @@ def guild_messages(self):
794
802
- :func:`on_reaction_add` (only for guilds)
795
803
- :func:`on_reaction_remove` (only for guilds)
796
804
- :func:`on_reaction_clear` (only for guilds)
805
+
806
+
For more information go to the :ref:`message intent documentation <need_message_intent>`.
807
+
808
+
.. note::
809
+
810
+
Currently, this requires opting in explicitly via the developer portal as well.
811
+
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_intent:
111
+
112
+
Message 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 recieve messages in DMs and when mentioned.
0 commit comments