From 35c59c75430021d5c69e80e491f464ee5fc428aa Mon Sep 17 00:00:00 2001 From: plun1331 <49261529+plun1331@users.noreply.github.com> Date: Mon, 14 Feb 2022 15:35:18 -0800 Subject: [PATCH 1/4] Update flags.py --- discord/flags.py | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/discord/flags.py b/discord/flags.py index 5bfb20a333..82624b0f6f 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -533,11 +533,12 @@ 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` and :attr:`members`. + except :attr:`presences`, :attr:`members`, and :attr:`message_content`. """ self = cls.all() self.presences = False self.members = False + self.message_content = False return self @flag_value @@ -757,9 +758,7 @@ def messages(self): .. note:: - As of April 2022 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. + :attr:`message_content` is required to recieve the actual content of guild messages. """ return (1 << 9) | (1 << 12) @@ -799,9 +798,7 @@ def guild_messages(self): .. note:: - As of April 2022 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. + :attr:`message_content` is required to recieve the actual content of guild messages. """ return 1 << 9 @@ -937,6 +934,31 @@ def dm_typing(self): """ return 1 << 14 + @flag_value + def message_content(self): + """:class:`bool`: Whether the bot will recieve message content in guild messages. + + This corresponds to the following attributes: + + - :attr:`Message.content` + - :attr:`Message.embeds` + - :attr:`Message.attachments` + - :attr:`Message.components` + + These attributes will still be available for messages recieved from interactions, + the bot's own messages, messages the bot was mentioned in, and DMs. + + .. versionadded:: 2.0 + + .. note:: + + As of April 2022 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 for more information. + + """ + return 1 << 15 + @flag_value def scheduled_events(self): """:class:`bool`: Whether "scheduled event" related events are enabled. From 967eba9e786c2c5ba1483e5676ce74f533265397 Mon Sep 17 00:00:00 2001 From: plun1331 <49261529+plun1331@users.noreply.github.com> Date: Mon, 14 Feb 2022 15:44:32 -0800 Subject: [PATCH 2/4] Update flags.py english major right here --- discord/flags.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/flags.py b/discord/flags.py index 82624b0f6f..f570f84733 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -758,7 +758,7 @@ def messages(self): .. note:: - :attr:`message_content` is required to recieve the actual content of guild messages. + :attr:`message_content` is required to receive the actual content of guild messages. """ return (1 << 9) | (1 << 12) @@ -798,7 +798,7 @@ def guild_messages(self): .. note:: - :attr:`message_content` is required to recieve the actual content of guild messages. + :attr:`message_content` is required to receive the actual content of guild messages. """ return 1 << 9 @@ -936,7 +936,7 @@ def dm_typing(self): @flag_value def message_content(self): - """:class:`bool`: Whether the bot will recieve message content in guild messages. + """:class:`bool`: Whether the bot will receive message content in guild messages. This corresponds to the following attributes: @@ -945,7 +945,7 @@ def message_content(self): - :attr:`Message.attachments` - :attr:`Message.components` - These attributes will still be available for messages recieved from interactions, + These attributes will still be available for messages received from interactions, the bot's own messages, messages the bot was mentioned in, and DMs. .. versionadded:: 2.0 From 6db390a034b9b2c7699befd889c6af0dd4ed5839 Mon Sep 17 00:00:00 2001 From: plun1331 <49261529+plun1331@users.noreply.github.com> Date: Mon, 14 Feb 2022 17:37:10 -0800 Subject: [PATCH 3/4] Update flags.py --- discord/flags.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/discord/flags.py b/discord/flags.py index f570f84733..9841484d30 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -787,7 +787,7 @@ 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: + Without the :attr:`message_content` intent enabled, the following fields are either an empty string or empty array: - :attr:`Message.content` - :attr:`Message.embeds` @@ -795,10 +795,6 @@ def guild_messages(self): - :attr:`Message.components` For more information go to the :ref:`message content intent documentation `. - - .. note:: - - :attr:`message_content` is required to receive the actual content of guild messages. """ return 1 << 9 From 54d91abded12973a0df57397f5774e712dff2411 Mon Sep 17 00:00:00 2001 From: plun1331 Date: Mon, 14 Feb 2022 21:17:40 -0800 Subject: [PATCH 4/4] Update flags.py --- discord/flags.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/discord/flags.py b/discord/flags.py index 1b4c2cce65..c45705c97b 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -932,21 +932,21 @@ def message_content(self): - :attr:`Message.embeds` - :attr:`Message.attachments` - :attr:`Message.components` - - These attributes will still be available for messages received from interactions, + + These attributes will still be available for messages received from interactions, the bot's own messages, messages the bot was mentioned in, and DMs. - + .. versionadded:: 2.0 - + .. note:: As of April 2022 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 for more information. - + """ return 1 << 15 - + @flag_value def scheduled_events(self): """:class:`bool`: Whether "scheduled event" related events are enabled.