Running into issues with your Discord bot on FPS.ms? This guide covers the most common problems and their solutions for both Python and Node.js bots.
Bot won't start
"No such file or directory: app.py"
Full error:/usr/local/bin/python: can't open file '/home/container/app.py': [Errno 2] No such file or directory
Cause: FPS.ms looks for app.py as the Python entry point, but the file is missing or named differently.
Fix:
- Go to the Files tab in the panel
- Make sure you have a file named exactly
app.pyin the root directory (not inside a subfolder) - If your main file has a different name, rename it to
app.py
"Cannot find module" (Node.js)
Full error:Error: Cannot find module 'discord.js'
Cause: Dependencies are not installed, usually because package.json is missing or incorrect.
Fix:
- Verify you have a
package.jsonin the root directory - Make sure
discord.jsis listed underdependenciesin yourpackage.json - Do not upload the
node_modulesfolder — FPS.ms runsnpm installautomatically - Restart your server to trigger a fresh install
"ModuleNotFoundError" (Python)
Full error:ModuleNotFoundError: No module named 'discord'
Cause: The requirements.txt file is missing or doesn't include discord.py.
Fix:
- Create a
requirements.txtfile in the root directory - Add
discord.py(and any other packages your bot uses) to the file - Restart your server — FPS.ms installs packages from
requirements.txton startup
requirements.txt
discord.py
Check your imports
Every
import statement in your code that isn't a Python built-in needs a matching line in requirements.txt. For example, if you use import aiohttp, add aiohttp to the file.Token errors
"TOKEN_INVALID" or "Improper token"
Cause: The bot token is wrong, expired, or not set. Fix:- Open your
.envfile in the Files tab on the FPS.ms panel - Check that
BOT_TOKEN=contains your full token with no extra spaces or line breaks - If in doubt, reset your token in the Discord Developer Portal and paste the new one
"Used disallowed intents"
Full error:discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled
Cause: Your code enables a privileged intent (Presence, Server Members, or Message Content) that isn't turned on in the Discord Developer Portal.
Fix:
- Go to the Discord Developer Portal
- Select your application and click Bot in the sidebar
- Scroll to Privileged Gateway Intents
- Enable the intents your bot uses
- Restart your bot on FPS.ms
Bot goes offline
Bot starts then immediately stops
Cause: Your code has an error that crashes the bot after connecting. Fix:- Check the Console tab for error messages — the last few lines before it stops will tell you what went wrong
- Common causes:
- Missing environment variable — see environment variables guide
- Syntax error in your code — fix and re-upload via SFTP or the panel
- Missing dependency — add it to
requirements.txtorpackage.json
Bot runs for a while then disconnects
Cause: Usually a memory limit, unhandled error, or rate limiting. Fix:- Memory limit: Free servers have limited RAM. Check if your bot uses a lot of memory (large caches, storing data in memory). Consider using a database instead.
- Unhandled errors: Add error handling to catch exceptions that would otherwise crash your bot:
@bot.event
async def on_error(event, *args, **kwargs):
print(f'Error in {event}: {args}')
client.on('error', error => {
console.error('Client error:', error);
});
process.on('unhandledRejection', error => {
console.error('Unhandled rejection:', error);
});
- Rate limiting: If your bot sends too many requests to Discord's API, it gets rate limited. Add delays between bulk operations and avoid sending messages in loops.
Bot goes offline at the same time every day
Cause: Free servers need to be renewed regularly. If the server stops, so does your bot. Fix:- Check your server renewal status on the panel
- Set up a schedule to auto-restart your bot
Slash commands not working
Commands not appearing
Cause: Commands haven't been synced with Discord, or you're using global commands (which take up to 1 hour to appear). Fix:- For Python (discord.py): Make sure you call
await self.tree.sync()in yoursetup_hook() - For Node.js (discord.js): Run your
deploy-commands.jsscript - Try using guild-specific commands for instant registration during development
"Unknown interaction" or "Interaction failed"
Cause: Your bot took longer than 3 seconds to respond to a command. Fix: Use deferred replies for slow operations: Python:@bot.tree.command(name='slow', description='A slow command')
async def slow(interaction: discord.Interaction):
await interaction.response.defer()
# ... do slow work ...
await interaction.followup.send('Done!')
await interaction.deferReply();
// ... do slow work ...
await interaction.followup.send('Done!');
Dependency issues
Python package version conflicts
Cause: Two packages require different versions of the same dependency. Fix: Pin specific versions inrequirements.txt:
requirements.txt
discord.py==2.5.2
aiohttp==3.11.14
Node.js "ERESOLVE unable to resolve dependency tree"
Cause: Package version conflicts in yourpackage.json.
Fix:
- Remove the
node_modulesfolder andpackage-lock.jsonfrom your server files - Restart the server to trigger a fresh
npm install - If the issue persists, update your
package.jsonto use compatible versions
Still need help?
If none of these solutions fix your issue:- Check the Console tab on the FPS.ms panel — error messages usually tell you exactly what's wrong
- Join the FPS.ms Discord server for community support
- Review the official documentation for your bot library:
- Python: discord.py docs
- Node.js: discord.js guide
CanerAkar