Skip to content

Commit ba20032

Browse files
authored
Merge pull request #390 from Pycord-Development/note-message-content-intent
Fix message content intent
2 parents 6008275 + 958a9a7 commit ba20032

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

discord/flags.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,11 @@ def none(cls: Type[Intents]) -> Intents:
551551
@classmethod
552552
def default(cls: Type[Intents]) -> Intents:
553553
"""A factory method that creates a :class:`Intents` with everything enabled
554-
except :attr:`presences`, :attr:`members`, and :attr:`guild_messages`.
554+
except :attr:`presences` and :attr:`members`.
555555
"""
556556
self = cls.all()
557557
self.presences = False
558558
self.members = False
559-
self.guild_messages = False
560559
return self
561560

562561
@flag_value
@@ -774,12 +773,11 @@ def messages(self):
774773
- :func:`on_reaction_remove` (both guilds and DMs)
775774
- :func:`on_reaction_clear` (both guilds and DMs)
776775
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-
779776
.. note::
780777
781-
Currently, this requires opting in explicitly via the developer portal as well.
778+
Currently requires opting in explicitly via the developer portal to receive the actual content of the guild messages.
782779
Bots in over 100 guilds will need to apply to Discord for verification.
780+
See https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Access-Deprecation-for-Verified-Bots for more information.
783781
"""
784782
return (1 << 9) | (1 << 12)
785783

@@ -808,12 +806,20 @@ def guild_messages(self):
808806
- :func:`on_reaction_remove` (only for guilds)
809807
- :func:`on_reaction_clear` (only for guilds)
810808
809+
Without the :attr:`ApplicationFlags.gateway_message_content` intent enabled, the following fields are either an empty string or empty array:
810+
811+
- :attr:`Message.content`
812+
- :attr:`Message.embeds`
813+
- :attr:`Message.attachments`
814+
- :attr:`Message.components`
815+
811816
For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.
812817
813818
.. note::
814819
815-
Currently, this requires opting in explicitly via the developer portal as well.
820+
Currently requires opting in explicitly via the developer portal to receive the actual content of the messages.
816821
Bots in over 100 guilds will need to apply to Discord for verification.
822+
See https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Access-Deprecation-for-Verified-Bots for more information.
817823
"""
818824
return 1 << 9
819825

0 commit comments

Comments
 (0)