💬 Message Content is Now a Privileged Intent 🗨️
⚠️ Today, message content is becoming a privileged intent for verified bots and apps as previously detailed: https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ
Any app that does not have the message content intent configured in its settings within the Developer Portal wiIl receive empty values in fields that expose message content across Discord's APIs. These restrictions do not apply for messages that a bot or app sends, in DMs that it receives, or in messages in which it is mentioned. The new message content restrictions will happen gradually throughout today, so you may not immediately encounter the new restrictions.
💡 Details about the message content intent is in the docs: https://discord.com/developers/docs/topics/gateway#message-content-intent
➡️ If your app is verified or eligible for verification:
Verified apps must be approved for the message content intent to receive message content. If your verified app isn’t approved, or doesn’t account for the new message content restrictions, it will break for users.
Temporary Message Content Intent Toggle
Verified apps or apps that have submitted for verification can temporarily opt-in to a grace period which will allow your app to continue receiving message content until October 1. However, if you opt-in to the grace period, your app will be prevented from joining any additional servers until you opt-out. You can toggle the temporary grace period at any time in your app's settings within the Developer Portal.
After Oct 1, the toggle will be disabled and there will be no way to enable the message content intent without Discord approval.
💡 Details about temporarily enabling message content: https://support-dev.discord.com/hc/en-us/articles/8561391080471
Applying for the Message Content Intent
To be approved for the intent, your app must have a use case that requires message content as described in the Review Policy: https://support-dev.discord.com/hc/articles/5324827539479. You can apply for privileged intent from your app’s settings in the Developer Portal after it’s verified.
Once your app is approved for the message content intent, you still must toggle the intent in your app’s settings on the Bot page under the “Privileged Gateway Intents” section.
➡️ If your app is not verified:
For unverified apps (that aren't eligible for verification), Discord approval is not required to use the message content intent, but you still must enable the intent in your app’s settings within the Developer Portal.
Existing unverified apps will automatically have the message content intent toggled on in their settings, but going forward, newly-created unverified apps will have the message content intent toggled off by default.
➡️ Gateway session reconnects:
As part of the deployment of the new message content restrictions, the majority of connected bots (verified and unverified) will see their WebSocket gateway sessions invalidated and closed. Because of the amount of bots using the Gateway, these restarts will not happen all at once. If your bot is correctly implementing normal recovery logic of a dropped connection, you shouldn't see any issues. Most developer libraries have recovery logic built-in, but if you aren't sure you can check the library's documentation or ask its maintainers.
For the Gateway session rollovers, bots will receive an INVALID_SESSION (Opcode 9) and the d field will be set to false, indicating the session is not resumable and that your bot will need to reconnect to the Gateway and send a new Identify event.
💡 Details about INVALID_SESSION and how to handle it: https://discord.com/developers/docs/topics/gateway#invalid-session
📌 FAQs and Resources are pinned in #697489244649816084 (in DDevs)