Smile Corp Docs
Polski
Rozwiązywanie problemów
Ta strona nie została jeszcze przetłumaczona na język polski, dlatego jest wyświetlana po angielsku.

Disallowed intents

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

Zaktualizowano 12 wrz 20261 min czytania
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.
Wskazówka

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.