Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): Message Content Intent in Migration Guide #1583

Merged
merged 7 commits into from
Aug 22, 2022
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions docs/migrating_to_v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Migrating to v2.0
=================

v2.0 introduced new Discord features and depcreated some old ones.
v2.0 introduced new Discord features and deprecated some old ones.

Part of the redesign involves making application commands and components. These changes include a new :class:`Bot` class, :class:`ui.View`, and a new :class:`ApplicationContext` class. If you're interested in creating them, please check out our :resource:`guide <guide>`.

Expand Down Expand Up @@ -95,7 +95,7 @@ Asset-related attributes that previously returned hash strings (e.g. :attr:`User
Webhook Changes
~~~~~~~~~~~~~~~

- :class:`Webhook` and :class:`WebhookMessage` are now always asynchronouns. For synchronouns use (``requests``), use :class:`SyncWebhook` and :class:`SyncWebhookMessage`.
- :class:`Webhook` and :class:`WebhookMessage` are now always asynchronous. For synchronous use (``requests``), use :class:`SyncWebhook` and :class:`SyncWebhookMessage`.
- ``WebhookAdapter``, ``AsyncWebhookAdapter``, and ``RequestsWebhookAdapter`` are removed, since they are unnecessary.
- ``adapter`` arguments of :meth:`Webhook.partial` and :meth:`Webhook.from_url` are removed. Sessions are now passed directly to ``partial`` / ``from_url``.

Expand All @@ -119,6 +119,17 @@ Webhook Changes
await webhook.send("Hello from Pycord 2.0")


.. _migrating_2_0_intents_changes:

Intents Changes
---------------

:attr:`Intents.message_content` is now a privileged intent. Disabling it causes :attr:`Message.content`,
:attr:`Message.embeds`, :attr:`Message.components`, and :attr:`Message.attachments` to be ``None``, directly causing
:class:`ext.commands.Commands` to not run.
JustaSqu1d marked this conversation as resolved.
Show resolved Hide resolved
See `here <https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ>`_ for more information.


.. _migrating_2_0_thread_introduced:

Threads Introduced
Expand Down Expand Up @@ -221,7 +232,7 @@ Many method arguments now reject ``None`` or return ``None``.
- The following :class:`.ext.commands.Context` attributes can now be ``None``: ``prefix``, ``command``, ``invoked_with``, ``invoked_subcommand``.
- :attr:`ext.commands.Command.help` can now be ``None``.

.. _migrating_2_0_miscelaneous_changes:
.. _migrating_2_0_miscellaneous_changes:

Miscellaneous Changes
---------------------
Expand Down