Smile Corp Docs
Français
Dépannage
Cette page n'a pas encore été traduite en français, elle est donc affichée en anglais.

Disallowed intents

Your bot asked Discord for data it hasn't been given permission to receive.

Mis à jour le 12 sept. 20261 min de lecture
Error: Used disallowed intents
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled

Some kinds of data - message text, the member list, online status - are privileged. Your code asks for them, but they haven’t been switched on for your bot in Discord.

Fix it

  1. Go to the Discord Developer Portal, open your application and go to Bot.
  2. Under Privileged Gateway Intents, turn on the ones your code uses:
    • Message Content Intent - reading what messages say (prefix commands like !help).
    • Server Members Intent - member joins, leaves and the member list.
    • Presence Intent - online/offline status and activities.
  3. Click Save Changes.
  4. Press Restart on your server’s Console tab.
Astuce

Only turn on what you actually use. Slash-command bots often need none of them. And once your bot is in 100 or more servers, Discord asks you to apply for these instead of just switching them on.