rustplusplus Enhanced is a comprehensive fork of the original rustplusplus by Alexemanuelol, enhanced by me with a little help from Claude, featuring advanced crafting features, storage integration, and optimization tools.
This NodeJS Discord Bot uses the rustplus.js library to utilize the power of the Rust+ Companion App with additional Quality-of-Life features and enhanced functionality.
- Control Smart Switches or Groups of Smart Switches via Discord or In-Game Team Chat
- Setup Smart Alarms to notify in Discord or In-Game Team Chat whenever they are triggered
- Use Storage Monitors to keep track of Tool Cupboard Upkeep or Large Wooden Box/Vending Machine content
- Head over to the Information Text Channel to see all sorts of information about the server and team member status
- Communicate with teammates from Discord to In-Game and vice versa
- Keep track of other teams on the server with the Player Tracker
- Extensive QoL Commands that can be used In-Game or from Discord
- Advanced Crafting Analysis - Comprehensive crafting calculation system with optimization tools
- Enhanced Storage Integration - Advanced storage monitoring and management capabilities
- Automatic Reconnection System - Robust connection management with health monitoring
- API Systems - Extended API integration for better server connectivity
- Optimization Tools - Performance enhancements and resource optimization
- TypeScript Support - Full TypeScript implementation for better code quality
- Enhanced Error Handling - Improved error management and logging systems
- π Current Item Data - Item names, ids and stack sizes from the game files, recipes and recycling from the open rust-items-json dataset (see Item Data below)
- π Base Watch - A cameras channel with snapshots from your own cameras and turrets (
/camera watch), refreshed every 5 minutes, and a list of the players outside the team they spotted. While the whole team is offline, strangers on camera and items taken from storage monitors are posted in the alerts channel, together with smart alarm triggers and decay warnings, so the busier activity channel can be muted - π Team tools -
/kicka team member from Discord, team map pins with labels on/map - π AI Assistant - Ask game questions in-game (
!ai) or via/aiβ answers from live server state + the scraped item/monument database; works with any OpenAI-compatible endpoint (Ollama, GROQ, Gemini)
npm startnpm testThis runs TypeScript compiler with --noEmit flag to check for type errors without generating output.
npm installNote: Uses npm-force-resolutions for dependency resolution.
# Windows
update.bat
# Linux/Mac
./update.sh- Entry Point:
index.ts- Initializes Discord bot and creates necessary directories - Main Bot Class:
src/structures/DiscordBot.js- Extends Discord.Client with custom functionality - Event Handlers:
src/discordEvents/- Discord event handlers (ready, messageCreate, etc.) - Command System:
src/commands/- Slash commands for Discord interactions - Rust+ Integration:
src/structures/RustPlus.js- Handles Rust+ API connections - Smart Device Management:
src/handlers/- Various handlers for smart devices and features
- Uses Discord.js v14 with gateway intents for guilds, messages and members
- Slash commands system with interaction handlers
- Multi-language support via internationalization
- FCM (Firebase Cloud Messaging) listeners for push notifications
- Rust+ connections through Facepunch's relay (game servers refuse direct connections since November 2026)
- Smart device control (switches, alarms, storage monitors)
- Instance-based configuration system
- JSON-based settings and templates
- Logging system with Winston
- Credential management for authentication
- Runtime: Node.js with TypeScript
- Discord: Discord.js v14
- Rust+ API: Custom rustplus.js library
- Image Processing: Jimp
- Authentication: FCM push notifications
Item names, ids and stack sizes come from the game's own item definitions (Bundles/items in a Rust install); recipes, research costs and recycling yields come from rust-items-json by bobosneefdev (MIT licence, extracted from the game files). To refresh them on a PC with Rust installed:
node src/util/itemData/update.js --rust-dir "D:/SteamLibrary/steamapps/common/Rust"
Then commit src/staticFiles and rebuild the image. The AI knowledge files in AI/ are rebuilt from these at startup.
Documentation can be found here. The documentation explains the features as well as
how to setup the bot, so make sure to take a look at it π
You can get your credentials by running the
rustplusplus credential application. Download it here
docker run --rm -it -v ${pwd}/credentials:/app/credentials -v ${pwd}/instances:/app/instances -v ${pwd}/logs:/app/logs -e RPP_DISCORD_CLIENT_ID=111....1111 -e RPP_DISCORD_TOKEN=token --name rpp nuallan/rustplusplus-forkedor
docker-compose up -dMake sure you use the correct values for DISCORD_CLIENT_ID as well as DISCORD_TOKEN in the docker command/docker-compose.yml
RPP_DISCORD_CLIENT_ID- Discord application client IDRPP_DISCORD_TOKEN- Discord bot tokenRPP_STEAM_API_KEY- (Optional) Free Steam Web API key; lets trackers find a server's address by nameRPP_AI_ENABLED- (Optional) Enable/disable the AI assistant (default:true; setfalseto disable)RPP_AI_BASE_URL- (Optional) OpenAI-compatible endpoint, e.g.http://host.docker.internal:11434/v1for Ollama (default:http://localhost:11434/v1)RPP_AI_API_KEY- (Optional) API key for the AI endpoint (leave empty for Ollama)RPP_AI_MODEL- (Optional) Model name (default:llama3.1)RPP_AI_KNOWLEDGE_DIR- (Optional) Extra editable AI knowledge folder, e.g./app/knowledgemounted as a volumeRPP_AI_MAX_TOKENS- (Optional) Max answer tokens (default:1500)RPP_AI_TEMPERATURE- (Optional) Sampling temperature (default:0.3)RPP_AI_TIMEOUT_MS- (Optional) AI request timeout in ms (default:120000)
See docker-compose.yml for a fully commented example and the ai block of config/index.js for the complete RPP_AI_* list (tool calling, device control, memory, alerts).
rustplusplus-enhanced/
βββ src/
β βββ commands/ # Discord slash commands
β βββ discordEvents/ # Discord event handlers
β βββ handlers/ # Feature-specific handlers
β βββ structures/ # Core classes (DiscordBot, RustPlus, etc.)
β βββ util/ # Utility functions and helpers
β βββ languages/ # Internationalization files
β βββ resources/ # Static assets (images, fonts)
β βββ staticFiles/ # Game data files (items, recipes, etc.)
βββ docs/ # Documentation and setup guides
βββ config/ # Configuration files
βββ credentials/ # User authentication data (created at runtime)
βββ instances/ # Server-specific configurations (created at runtime)
βββ logs/ # Application logs (created at runtime)
βββ index.ts # Main entry point
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
- The bot requires Rust+ credentials obtained via the companion app
- Each Discord server requires pairing with a Rust game server
- Smart devices must be paired in-game before Discord control
- The bot maintains persistent connections to monitor real-time events
- Multi-language support requires proper locale configuration
liamcottle@GitHub - for the rustplus.js library.
.Vegas.#4844@Discord - for the awesome icons!
Alexemanuelol@GitHub - for the original rustplusplus project.
