Add message_content intent and move to api v10

This commit is contained in:
Josh
2022-02-18 23:44:46 +10:00
committed by GitHub
parent b1571ccc25
commit 37f96e3473
3 changed files with 45 additions and 10 deletions

View File

@@ -514,6 +514,7 @@ class Intents(BaseFlags):
self = cls.all()
self.presences = False
self.members = False
self.message_content = False
return self
@flag_value
@@ -892,6 +893,33 @@ class Intents(BaseFlags):
"""
return 1 << 14
@flag_value
def message_content(self):
""":class:`bool`: Whether message content, attachments, embeds and components will be available in messages
which do not meet the following criteria:
- The message was sent by the client
- The message was sent in direct messages
- The message mentions the client
This applies to the following events:
- :func:`on_message`
- :func:`on_message_edit`
- :func:`on_message_delete`
- :func:`on_raw_message_edit`
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.
Bots in over 100 guilds will need to apply to Discord for verification.
.. versionadded:: 2.0
"""
return 1 << 15
@fill_with_flags()
class MemberCacheFlags(BaseFlags):