Skip to content

tanishisherewithhh/ImperialsBot

Repository files navigation

ImperialBot

Important

New to ImperialBot? Check out our User Guide for setup instructions and troubleshooting tips.


ImperialBot is a tool for managing multiple Minecraft bots from a single web dashboard. It uses the Mineflayer engine to handle bot logic and allows you to control several accounts at once through your browser.


Getting Started

  1. Make sure you have Node.js installed.
  2. Run start.bat (Windows) or start.sh (Linux) to install dependencies and start the server.
  3. Go to http://localhost:3000 in your browser.

For more information on bot capabilities, see the Mineflayer Documentation.

Cloud Deployment

ImperialsBot can be deployed on cloud platforms like Render.com. Because cloud containers have ephemeral filesystems, the IMPERIALS_CLOUD_MODE environment variable enables:

  • Bot config stored in environment variables (persists across restarts)
  • Viewer/inventory via proxy routes on the main port

Set IMPERIALS_CLOUD_MODE=true in your Render environment variables. See the User Guide for full details.


How it works

The project is split into a few main parts:

  1. Bot Manager: Handles the lifecycle of your bots.
  2. Web Server: Uses Socket.io to talk to the dashboard in real-time.
  3. Features: Built-in logic like Killaura and AutoEat.
  4. Plugins: A system for adding your own scripts without touching the core code.

Plugin System

You can add custom logic by placing JavaScript files in the src/plugins/ folder. The bot will automatically detect new files and reload them while the server is running. Every plugin gets access to a simple API for logging and sending chat messages.

ExamplePlugin.js explains the plugin structure and provides documentation for the plugin API.

Example: Custom Command Plugin

This example shows how to make a bot respond to a !help command:

export default class HelpPlugin {
    constructor() {
        this.name = 'HelpPlugin';
        this.description = 'Responds to !help and other commands';
        this.enabled = true;
        this.color = 'a'; // Green color in logs
    }

    init(bot, api) {
        this.bot = bot;
        this.api = api;

        this.bot.on('chat', (username, message) => {
            if (!this.enabled) return;
            if (username === this.bot.username) return;

            const msg = message.toLowerCase();

            if (msg === '!help') {
                this.api.log(`Responding to help request from ${username}`, 'info');
                this.bot.chat(`Hello ${username}! Available commands: !help, !info`);
            } else if (msg === '!info') {
                this.bot.chat(`ImperialBot Instance v2.0`);
            }
        });
    }

    enable() {
        this.enabled = true;
        this.api.log('Plugin enabled.', 'success');
    }

    disable() {
        this.enabled = false;
        this.api.log('Plugin disabled.', 'warning');
    }
}

What it looks like currently:

Dashboard Default Theme Dashboard Default Theme
Dashboard Simple Dark Theme Dashboard Simple Dark Theme
Dashboard Terminal (CRT) Theme Dashboard Terminal (CRT) Theme
Dashboard Emerald Theme Dashboard Emerald Theme
Rest of the dashboard Rest of the dashboard

License

This project is licensed under the GNU General Public License v3.

Author: tanishisherewith