---
title: "Used disallowed intents error in a Discord bot: how to fix it | StreetHosting"
description: "Fix the Used disallowed intents error (4014) and the bot that cannot read messages: enable privileged intents in the Developer Portal and declare them in code."
url: "https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error"
type: "page"
language: "en-US"
---

Discord Bots · 8 min · Beginner

Published on Nov 13, 2026 · Updated on Nov 13, 2026

# Privileged intents error in a Discord bot: Used disallowed intents and a bot that cannot read messages

The bot crashes on connect with Used disallowed intents, or it connects and cannot see the text of messages. Both have the same root: privileged intents must be switched on in the portal and declared in the code.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Errors and diagnostics](https://streethosting.com.br/en/guides/topics/troubleshooting) [Security and hardening](https://streethosting.com.br/en/guides/topics/security)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=Used%20disallowed%20intents%20error%20in%20a%20Discord%20bot%3A%20how%20to%20fix%20it&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error "Share on LinkedIn") [](https://wa.me/?text=Used%20disallowed%20intents%20error%20in%20a%20Discord%20bot%3A%20how%20to%20fix%20it%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-disallowed-intents-error "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error.md)

In this guide 8 sections

* [What the error means](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#o-que-significa)
* [The three privileged intents](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#tres-intents)
* [Enable them in the Developer Portal](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#ativar-portal)
* [Declare them in discord.js v14](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordjs)
* [Declare them in discord.py](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordpy)
* [The bot connects but cannot read messages](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#bot-nao-le)
* [Verification from 100 servers](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#verificacao)
* [Where to run the bot](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#onde-rodar)

Quick answer

The **Used disallowed intents** error (close code `4014`) happens when the code asks for a privileged intent that is not switched on in the Discord Developer Portal. Open the application, go to the **Bot** tab, enable **Presence Intent**, **Server Members Intent** and/or **Message Content Intent** depending on what the bot uses, save and restart the bot. The code must also declare the same intent, in `GatewayIntentBits` in discord.js or in `discord.Intents` in discord.py.

## What the error means[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#o-que-significa)

When the bot connects to Discord's gateway, it tells Discord which types of event it wants to receive. Each type is an intent. A member joining, a message being created and a status change are examples of events that depend on intents. This reduces the volume of data that reaches the bot and protects users, because not every bot needs to know who is online or what people write.

Three of these intents are **privileged**: Discord only delivers them after the application owner switches them on manually in the portal. If your code asks for one and the portal switch is off, Discord refuses the connection and closes it with code 4014. The message appears in different forms depending on the library:

* **discord.js:** `Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted`.
* **discord.py:** `discord.errors.PrivilegedIntentsRequired`, with a text saying the shard is requesting privileged intents that are not enabled in the portal.
* **Other libraries and gateway logs:** `Used disallowed intents` or simply `4014`.

A similar error is `4013`, Invalid intent(s). It points to an intents value Discord does not even recognize, usually a number built by hand with a mistake. That is not the case here: 4014 is always a valid intent that is not cleared for the application, either because it is switched off in the portal or because the bot is already verified and the intent was not approved.

## The three privileged intents[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#tres-intents)

| Intent in the portal   | Name in discord.js | What it is for                                                                            |
| ---------------------- | ------------------ | ----------------------------------------------------------------------------------------- |
| Presence Intent        | GuildPresences     | Online or offline status, current activity and what the member is playing or listening to |
| Server Members Intent  | GuildMembers       | Events for members joining, leaving and updating, and the full member list of the server  |
| Message Content Intent | MessageContent     | The text of user messages, including attachments, embeds and components                   |

In practice, almost every intents error comes from one of these three cases:

* **Commands with a prefix, like !ping:** the bot has to read the message text, so it requires Message Content.
* **Welcome messages, member counters and automatic roles:** the member join event requires Server Members.
* **Member status and activity:** statistics bots, presence bots and lists of who is online require Presence.

Switch on only what the bot really uses. Each privileged intent adds to the volume of events and, once the bot grows, will be one more justification for Discord to review during verification. A bot that only answers slash commands needs none of the three.

## Enable them in the Developer Portal[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#ativar-portal)

1. Open the Discord Developer Portal and sign in with the account that owns the application.
2. Choose the bot's application under **Applications**. Confirm it is the same one whose token is in your code.
3. In the side menu, open the **Bot** tab and scroll to the **Privileged Gateway Intents** section.
4. Switch on the intents the code uses: **Presence Intent**, **Server Members Intent** and/or **Message Content Intent**.
5. Click **Save Changes**. Without saving, nothing changes.
6. Restart the bot. The old connection stays valid until the process is restarted, and it is the new connection that asks for the intents.

Switching it on in the portal is not enough, and declaring it in the code is not enough either. Both ends must agree. An intent switched on in the portal and missing from the code makes the bot connect normally and simply not receive the events. An intent in the code and switched off in the portal produces the 4014.

## Declare them in discord.js v14[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordjs)

In discord.js the intents go in when you create the client. To read text messages in a server, Message Content alone is not enough: the bot also needs `Guilds` and `GuildMessages` to receive the message event.

`` import { Client, Events, GatewayIntentBits } from "discord.js"; const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, // privileged GatewayIntentBits.GuildMembers, // privileged // GatewayIntentBits.GuildPresences, // privileged, only if you need it ], }); client.once(Events.ClientReady, (c) => { console.log(`Online como ${c.user.tag}`); }); client.on(Events.MessageCreate, (message) => { if (message.author.bot) return; if (message.content === "!ping") { message.reply("pong"); } }); client.login(process.env.DISCORD_TOKEN); ``

If you delete the `MessageContent` line and leave the intent switched off in the portal, the 4014 error goes away, but `message.content` starts arriving empty in almost every message. That is why the right path is to decide first whether the bot really needs to read text. To have the example's token come from a safe file, see [how to keep your bot token in environment variables](https://streethosting.com.br/en/guides/discord-bots/discord-bot-token-environment-variables).

## Declare them in discord.py[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordpy)

In discord.py you build an intents object, switch on what you need and pass it to the client or the bot. The default from `Intents.default()` already includes the common intents and leaves the privileged ones out.

`import os import discord from discord.ext import commands intents = discord.Intents.default() intents.message_content = True # privileged intents.members = True # privileged # intents.presences = True # privileged, only if you need it bot = commands.Bot(command_prefix="!", intents=intents) @bot.event async def on_ready(): print(f"Online como {bot.user}") @bot.command() async def ping(ctx): await ctx.send("pong") bot.run(os.getenv("DISCORD_TOKEN"))`

If the intent is not switched on in the portal, `bot.run` ends with `PrivilegedIntentsRequired`. The error text gives the portal address but does not say which intent is missing, so check each one the code switches on. For Python bots that stay up all day, the guide on [hosting a Discord bot in Python](https://streethosting.com.br/en/guides/discord-bots/host-python-discord-bot) shows the rest of the setup.

## The bot connects but cannot read messages[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#bot-nao-le)

The second symptom is trickier because it raises no error at all. The bot stays online and answers some commands, but `message.content` arrives as empty text and prefix commands never fire. Without the Message Content Intent, Discord still delivers the message event but empties the text. The exceptions are few: messages sent by the bot itself, DMs with the bot, messages that mention the bot and the message someone uses one of the bot's context menu commands on.

Go through this list in order:

1. **Is the Message Content Intent switched on in the Bot tab?** Did you save after switching it on?
2. **Does the code declare MessageContent?** In discord.js it also needs GuildMessages. In discord.py, it needs `intents.message_content = True` before the bot is created.
3. **Was the process restarted after the change?** A bot that keeps running keeps the intents of the old connection.
4. **Is the token from the right application?** People with several test applications end up switching the intent on in one and running the token of another.
5. **Does the bot have permission to see the channel?** An intent does not replace a permission: without the View Channel permission, it does not receive the messages from there.

For the full diagnosis, including a stopped process, an invalid token and rate limits, follow the checklist for a [Discord bot that is offline or not responding](https://streethosting.com.br/en/guides/discord-bots/discord-bot-offline-not-responding).

Before switching Message Content on, consider replacing prefix commands with slash commands. They do not depend on reading messages, they show up in Discord's menu and they spare you any future approval. The comparison is in [slash commands vs prefix commands](https://streethosting.com.br/en/guides/discord-bots/discord-slash-commands-vs-prefix-commands).

## Verification from 100 servers[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#verificacao)

The freedom to flip the switch yourself has a limit. While the bot is in fewer than 100 servers, the three privileged intents are just switches in the portal. At 100 servers, Discord requires the bot to be **verified**, and privileged intents stop being automatic: each one has to be requested and approved.

* **Bot verification:**done in the portal, in the application's verification tab. Discord asks for identity details of the person responsible and checks that the bot follows the developer terms. Without it, the bot cannot join new servers after hitting the limit.
* **Approval of privileged intents:** each intent needs a written justification, explaining what the bot needs it for and how it improves the experience of the people using it. Vague requests tend to be denied.
* **Denied intent:** the bot keeps working without it. Prefix commands stop reading text, so the way out is to move to slash commands.

Do not leave verification for the last day. Review times vary, and a bot sitting at the limit without verification cannot join new servers. If your bot has already passed 100 servers, check the current process in Discord's official documentation, because the rules and forms change. If the bot is growing, it is also worth learning [sharding for many servers](https://streethosting.com.br/en/guides/discord-bots/discord-bot-sharding).

## Where to run the bot[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#onde-rodar)

Intents are configuration of the application on Discord and of the code, so the error does not depend on the hosting: 4014 is fixed the same way anywhere. What hosting changes is the routine after the fix, because you have to restart the process so the new connection asks for the right intents.

* **Bot hosting:** the [StreetHosting bot hosting](https://streethosting.com.br/en/bots) plans run containers with a panel for Node.js and Python, for Discord bots only. Discord Essential costs R$ 9.99 per month and includes 1 GB of RAM and up to 2 bots. After changing intents, restart the bot from the panel.
* **First bot from scratch:** if you are still putting the project together, the guide on [how to create your first Discord bot](https://streethosting.com.br/en/guides/discord-bots/create-discord-bot) covers the application, the token and the choice of intents from the start.

In this guide

* [What the error means](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#o-que-significa)
* [The three privileged intents](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#tres-intents)
* [Enable them in the Developer Portal](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#ativar-portal)
* [Declare them in discord.js v14](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordjs)
* [Declare them in discord.py](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#declarar-discordpy)
* [The bot connects but cannot read messages](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#bot-nao-le)
* [Verification from 100 servers](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#verificacao)
* [Where to run the bot](https://streethosting.com.br/en/guides/discord-bots/discord-bot-disallowed-intents-error#onde-rodar)

## Frequently asked questions

What does Used disallowed intents mean?

It means the code asked Discord for a privileged intent, such as Message Content or Server Members, that is not switched on in the Bot tab of the Developer Portal. Discord closes the connection with code 4014. The fix is to switch the same intent on in the portal or stop asking for it in the code.

Do I need the Message Content Intent to use slash commands?

No. Slash commands, buttons, menus and forms reach the bot as interactions, which do not depend on message content. Message Content is for reading the text people type, as in commands with a prefix.

I enabled the intent in the portal and the error remains. What is missing?

Check that you saved the changes on the Bot tab, that you are in the right application and that you restarted the bot afterward. The old process may still be running with the previous connection. Also confirm the token in your code belongs to the same application where you switched the intent on.

What is the server limit for using privileged intents without approval?

While the bot is in fewer than 100 servers, you switch privileged intents on yourself in the portal. At 100 or more, the bot must be verified and privileged intents go through Discord's approval, with a justification for the use.

Does discord.py have the same problem?

Yes. Without the intent switched on in the portal, discord.py raises the PrivilegedIntentsRequired exception on connect. In the code you also have to declare it, for example intents.message\_content = True, before creating the client.

Next step

See bot plans

24/7 Discord bots with fast activation and support in Portuguese.

[See bot plans](https://streethosting.com.br/en/bots)

## Related guides

[Discord bots Beginner How to create your first Discord bot from scratch Never built a bot and not sure where to start? Here is the path from zero: create the application, get the token, invite the bot with the right permissions, and make it reply. 3 min Read guide](https://streethosting.com.br/en/guides/discord-bots/create-discord-bot) [Discord bots Intermediate Discord bot offline or not responding: how to diagnose it Your bot vanished or ignores commands. Before rewriting any code, work through a diagnostic order: is the process running, is the token valid, are the intents and permissions right. 4 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-bot-offline-not-responding) [Discord bots Beginner Slash commands vs prefix commands for Discord bots: which to use Discord changed how bots receive commands. Slash commands are the official standard, but prefix commands still work. Learn when to use each one and how to migrate. 3 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-slash-commands-vs-prefix-commands)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
