Advanced Process Manager for Discord Bots with Auto-Restart, Error Detection, and Shard Management
npm install nexusautobotAdvanced Process Manager for Discord Bots - Built specifically for Discord.js with intelligent monitoring, auto-restart, and error detection.


- 🔄 Auto-Restart - Automatically restarts your bot on crash
- 🧠 Intelligent Error Detection - Analyzes errors and determines severity
- 📊 Discord.js Optimized - Built specifically for Discord bots
- 🎯 Live Dashboard - Real-time monitoring with beautiful CLI interface
- 🔔 Discord Webhook Notifications - Get notified directly in Discord
- 🚦 Shard Management - Auto-sharding support for large bots
- 📝 Advanced Logging - Keep track of everything
- ⚡ Zero Config - Works out of the box
``bash`
npm install -g nexusautobot
`bashStart your bot
nexus start bot.js --name my-bot
📖 Commands
$3
`bash
nexus start [options]Options:
-n, --name Bot name
-i, --instances Number of instances (default: 1)
--shard Enable auto-sharding
--webhook Discord webhook URL for notifications
`Example:
`bash
nexus start bot.js --name "MyDiscordBot" --webhook "https://discord.com/api/webhooks/..."
`$3
`bash
nexus list
or
nexus ls
`$3
`bash
nexus status
`$3
`bash
nexus logs [options]Options:
-f, --follow Follow log output
-n, --lines Number of lines (default: 50)
`$3
`bash
nexus dashboard
or
nexus dash
`The dashboard shows:
- 🤖 Running bots with status
- 📜 Live logs
- 📊 CPU & Memory usage
- 📈 System statistics
Press
q or ESC to exit.$3
`bash
nexus stop
nexus restart
`$3
`bash
nexus delete
nexus delete-all
`$3
`bash
nexus webhook
`Webhook notifications include:
- ⚠️ Critical errors
- 🔄 Auto-restarts
- 🛑 Maximum restart limit reached
- ✅ Bot started/stopped
🎨 Features in Detail
$3
NexusAutoBot analyzes errors and categorizes them:
- Critical Errors (Auto-restart)
- Invalid token
- Connection failures
- Memory issues
- Fatal Node.js errors
- Non-Critical Errors (No restart)
- Rate limits
- Missing permissions
- Temporary Discord API issues
$3
- Gateway ping tracking
- Command usage statistics
- Event monitoring
- API call tracking
- Memory leak detection
- Shard health monitoring
$3
`bash
nexus start bot.js --shard
`Automatically manages shards based on server count and optimizes distribution.
🔧 Configuration
NexusAutoBot stores configuration in
~/.nexusautobot/-
config.json - Global settings
- processes.json - Bot processes data📊 Example Bot
`javascript
// bot.js
const { Client, GatewayIntentBits } = require('discord.js');const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});
client.on('ready', () => {
console.log(
Logged in as ${client.user.tag});
});client.on('messageCreate', (message) => {
if (message.content === '!ping') {
message.reply('Pong!');
}
});
client.login(process.env.TOKEN);
`Start it:
`bash
nexus start bot.js --name ping-bot --webhook
`🆚 NexusAutoBot vs PM2
| Feature | NexusAutoBot | PM2 |
|---------|-------------|-----|
| Discord.js Optimized | ✅ | ❌ |
| Intelligent Error Detection | ✅ | ❌ |
| Discord Webhook Integration | ✅ | ❌ |
| Auto-Sharding | ✅ | ❌ |
| Bot-Specific Monitoring | ✅ | ❌ |
| General Process Management | ❌ | ✅ |
NexusAutoBot is built specifically for Discord bots, while PM2 is a general-purpose process manager.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (
git checkout -b feature/AmazingFeature)
3. Commit your changes (git commit -m 'Add some AmazingFeature')
4. Push to the branch (git push origin feature/AmazingFeature`)MIT License - see the LICENSE file for details
- Built with ❤️ by the NexusHub Team
- Inspired by PM2 but optimized for Discord bots
Found a bug? Open an issue
- GitHub Issues: Issues Page
- Discord: Join our Discord
- Email: support@nexushub.dev
If you find NexusAutoBot useful, please consider giving it a star on GitHub! ⭐
---
Made with 💙 for the Discord bot community