Find the message in Console (or under a field in the panel), then use the row below. For the most common ones the panel also shows a banner above the console with a button to the fix.
Login errors
Message
Meaning
Fix
An invalid token was provided, TokenInvalid, LoginFailure: Improper token has been passed, close code 4004
Discord refused the token: it was reset, or copied wrong. Banner: Discord did not accept your bot token.
Reset the token in the Developer Portal, then Replace token on the Bot page, pane Discord, and restart.
Used disallowed intents, PrivilegedIntentsRequired, close code 4014
Your code asks for a privileged intent that is off. Banner: Your bot needs an intent that is switched off.
A KeyError naming your token variable (Python), or a token that is undefined / None although the Discord pane says Valid
Your code reads the token under another name.
Read DISCORD_TOKEN (or TOKEN, BOT_TOKEN, DISCORD_BOT_TOKEN): those are the names the token reaches your code under. Restart once after saving the token.
Messages when you paste a token
Message
Fix
That looks like the Client Secret, not the token.
Copy the token from Bot, Reset Token in the Developer Portal, not from OAuth2.
That is a Discord account token, not a bot token.
Use your application's bot token. Self-bots break Discord's terms and are not hosted.
That is not a Discord bot token.
Copy the whole token again.
This bot was checked a lot in a short time. Try again in 30 seconds.
Wait for the time shown, then Check now.
Start errors from PlayNHost
Line
Fix
[PlayNHost] Your bot is not set up yet: ... (banner Your bot has no code yet)
The Entry file (main file, jar, program or project) is not on the server. Upload it or fix the name on the Code pane.
[PlayNHost] ... is a Python file, but this server runs Node.js. (or the other way round)
Change the type with Change what runs, keeping your files.
[PlayNHost] ... starts with ```, a Markdown code fence ...
Delete the first and last ``` lines of the file in Files.
[PlayNHost] Some packages in Bot page, Code, Packages could not be installed.
Fix the spelling in Packages; separate names with spaces.
[PlayNHost] A Git repository is set, but this server already has files, so it was not downloaded.
Let the bot's role view the channel, or check the bot is still in that server.
DiscordAPIError[50013]: Missing Permissions
The bot lacks a permission, or its role is below the role or member it acts on.
Add the permission and move the bot's role above the roles it manages.
Cannot send messages to this user (50007)
The user has direct messages closed, or shares no server with the bot.
Catch the error in your code and answer in the channel instead.
Interaction errors
Message
Meaning
Fix
Unknown interaction (10062)
The bot took more than 3 seconds to answer a slash command.
Defer first (deferReply() / response.defer()), then answer.
Interaction has already been acknowledged (40060)
Your code replied twice.
Reply once, then use a follow-up or an edit.
Unknown Message (10008), Unknown Channel (10003)
The message or channel was deleted.
Check it still exists, and catch the error.
Package and code errors
Message
Meaning
Fix
Cannot find module 'x', ERR_MODULE_NOT_FOUND
A Node.js package is missing. Banner: A package your code needs is missing.
Add it to package.json or to Packages.
ModuleNotFoundError: No module named 'x'
A Python package is missing.
Add it to requirements.txt or to Packages. The pip name can differ from the import name.
SyntaxError on line 1
Often the wrong language for the server, or a ``` line from a chat.
See the start errors above.
Memory, rate limits and the network
JavaScript heap out of memory, MemoryError, java.lang.OutOfMemoryError: the bot used all the memory its plan gives. Banner: Your bot ran out of memory. See How much RAM does a Discord bot need.
429 Too Many Requests: the bot sends too fast. Libraries wait and retry by themselves; slow down loops that edit many messages or add many reactions. See How to avoid Discord rate limits and bans.
ECONNRESET, Connect Timeout Error, getaddrinfo EAI_AGAIN: a short network blip between the bot and Discord. Good libraries reconnect by themselves. If it never recovers, restart the bot.
Messages when you save an environment variable
DISCORD_TOKEN is set by PlayNHost and cannot be changed here.: the token and the names the panel manages (also TOKEN, BOT_TOKEN, DISCORD_BOT_TOKEN, GIT_TOKEN, NODE_OPTIONS, PATH, HOME, and your bot type's own settings such as MAIN_FILE) cannot be added as variables.
PYTHONPATH controls how the bot starts and cannot be set here.: names that change how a runtime or the shell starts (such as PYTHON..., NODE_PATH, JAVA_TOOL_OPTIONS, LD_...) are refused. In a pasted .env they are marked Skipped and the rest imports.
We use cookies to keep the site working, to understand how it is used, and to measure our marketing. You can accept all, accept essential cookies only, or choose per category.We use cookies to keep the site working, to understand how it is used, and to measure our marketing. They are on by default here. You can switch off anything you do not want.Read our privacy policy