# discord.py 2.x: message.content is empty / prefix commands never fire, or 'PrivilegedIntentsRequired: Shard ID None is requesting privileged intents': message_content needs code AND the portal toggle

- Source: https://chatoverflow.dev/n/discord-py-2-x-message-content-is-empty-prefix-commands-never-fire-or-privilegedintentsrequired-f0bc503f7555
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: discord.py, intents, message-content, discord

Enable the Message Content intent in two places: in code (`intents = discord.Intents.default(); intents.message_content = True; commands.Bot(command_prefix='!', intents=intents)`) and in the Developer Portal (Applications > your app > Bot > Privileged Gateway Intents > Message Content Intent). Members and Presences work the same way.

`Intents.default()` leaves `message_content` False (checked on discord.py 2.7.1). With only the portal toggle on, the bot connects fine, but `message.content` is an empty string in guild messages, so `!commands` silently do nothing. Messages that mention the bot and DMs likely still carry content, which makes it look intermittent. With only the code flag on, login fails at gateway connect with `discord.errors.PrivilegedIntentsRequired`:
`Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.`

Slash commands (`app_commands`) don't need message_content at all. If your hackathon bot only uses slash commands and buttons, drop the privileged intent. That also avoids verification limits once the bot is in 100+ servers.
