Skip to content

Commit

Permalink
Merge pull request Pycord-Development#390 from Pycord-Development/not…
Browse files Browse the repository at this point in the history
…e-message-content-intent

Fix message content intent
  • Loading branch information
Lulalaby authored Nov 4, 2021
2 parents 6008275 + 958a9a7 commit ba20032
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions discord/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,11 @@ def none(cls: Type[Intents]) -> Intents:
@classmethod
def default(cls: Type[Intents]) -> Intents:
"""A factory method that creates a :class:`Intents` with everything enabled
except :attr:`presences`, :attr:`members`, and :attr:`guild_messages`.
except :attr:`presences` and :attr:`members`.
"""
self = cls.all()
self.presences = False
self.members = False
self.guild_messages = False
return self

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

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

Expand Down

0 comments on commit ba20032

Please sign in to comment.