# devrock07/rockv3-selfbot architecture

> Architecture diagram of the GitHub repository devrock07/rockv3-selfbot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devrock07/rockv3-selfbot
- Repository: https://github.com/devrock07/rockv3-selfbot

## Overview

RockV3 is a Discord selfbot with command features and a browser-based Rich Presence editor. Its main workflow starts with a Discord message: the message handler checks permissions, resolves and executes a command, and can forward execution logs to the web server. Separately, a browser can use the web interface to update the Discord activity; the server also streams command logs to connected clients. The README documents customizable activity types and real-time logs. Some frontend and command details are not shown in excerpts, so those connections are omitted where unverified.

Main entry points: [`handlers/messageCreate.js`](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/messageCreate.js) (Message Routing), [`handlers/webServer.js`](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/webServer.js) (Web Server), [`index.js`](https://github.com/devrock07/rockv3-selfbot/blob/main/index.js) (Bot Entry), [`handlers/commandHandler.js`](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/commandHandler.js) (Command Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot Runtime"]
  node_entry["Bot Entry<br/>[index.js]"]
  node_messages["Message Routing<br/>[messageCreate.js]"]
  node_loader["Command Loader<br/>[commandHandler.js]"]
  node_ready["Ready Handler<br/>[ready.js]"]
  node_crash["Crash Handler<br/>[crash-handler.js]"]
end

subgraph group_commands["Command Features"]
  node_fun["Fun Commands"]
  node_info["Info Commands"]
  node_help["Help Command<br/>[help.js]"]
  node_status["Status Command<br/>[status.js]"]
end

subgraph group_web["Web RPC"]
  node_webserver["Web Server<br/>[webServer.js]"]
  node_webui["Web Interface"]
  node_logstream["Live Log Stream<br/>[webServer.js]"]
end

subgraph group_config["Configuration"]
  node_settings["Bot Configuration<br/>[config.js]"]
end

node_discord_user(("Discord User"))
node_browser(("Browser User"))
node_discord{{"Discord"}}

node_entry -->|"registers"| node_messages
node_entry -->|"loads"| node_loader
node_entry -->|"registers"| node_ready
node_entry -->|"registers"| node_crash
node_entry -->|"starts"| node_webserver
node_entry -->|"reads"| node_settings
node_discord_user -->|"sends message"| node_messages
node_messages -->|"resolves command"| node_loader
node_loader -->|"loads commands"| node_fun
node_loader -->|"loads commands"| node_info
node_messages -->|"dispatches"| node_fun
node_messages -->|"dispatches"| node_info
node_messages -->|"dispatches"| node_help
node_messages -->|"dispatches"| node_status
node_messages -->|"posts command logs"| node_webserver
node_status -->|"sets activity"| node_discord
node_webserver -->|"reads settings"| node_settings
node_webserver -->|"serves files"| node_webui
node_browser -->|"updates RPC"| node_webserver
node_webserver -->|"sets activity"| node_discord
node_webserver -->|"emits logs"| node_logstream
node_logstream -->|"streams logs"| node_browser
node_messages -->|"handles events"| node_discord
node_ready -->|"reads client state"| node_discord
node_crash -->|"checks guild membership"| node_discord

click node_entry "https://github.com/devrock07/rockv3-selfbot/blob/main/index.js"
click node_messages "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/messageCreate.js"
click node_loader "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/commandHandler.js"
click node_ready "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/ready.js"
click node_crash "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/crash-handler.js"
click node_fun "https://github.com/devrock07/rockv3-selfbot/tree/main/commands/fun"
click node_info "https://github.com/devrock07/rockv3-selfbot/tree/main/commands/info"
click node_help "https://github.com/devrock07/rockv3-selfbot/blob/main/commands/help.js"
click node_status "https://github.com/devrock07/rockv3-selfbot/blob/main/commands/status.js"
click node_settings "https://github.com/devrock07/rockv3-selfbot/blob/main/config.js"
click node_webserver "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/webServer.js"
click node_webui "https://github.com/devrock07/rockv3-selfbot/tree/main/public"
click node_logstream "https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/webServer.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_messages,node_loader,node_ready,node_crash,node_discord_user,node_browser toneBlue
class node_fun,node_info,node_help,node_status toneAmber
class node_webserver,node_webui,node_logstream toneMint
class node_settings toneRose
class node_discord toneIndigo
```

## Components

### Bot Runtime

- [Bot Entry](https://github.com/devrock07/rockv3-selfbot/blob/main/index.js): `index.js`
- [Message Routing](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/messageCreate.js): `handlers/messageCreate.js`
- [Command Loader](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/commandHandler.js): `handlers/commandHandler.js`
- [Ready Handler](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/ready.js): `handlers/ready.js`
- [Crash Handler](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/crash-handler.js): `handlers/crash-handler.js`

### Command Features

- [Fun Commands](https://github.com/devrock07/rockv3-selfbot/tree/main/commands/fun): `commands/fun`
- [Info Commands](https://github.com/devrock07/rockv3-selfbot/tree/main/commands/info): `commands/info`
- [Help Command](https://github.com/devrock07/rockv3-selfbot/blob/main/commands/help.js): `commands/help.js`
- [Status Command](https://github.com/devrock07/rockv3-selfbot/blob/main/commands/status.js): `commands/status.js`

### Web RPC

- [Web Server](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/webServer.js): `handlers/webServer.js`
- [Web Interface](https://github.com/devrock07/rockv3-selfbot/tree/main/public): `public`
- [Live Log Stream](https://github.com/devrock07/rockv3-selfbot/blob/main/handlers/webServer.js): `handlers/webServer.js`

### Configuration

- [Bot Configuration](https://github.com/devrock07/rockv3-selfbot/blob/main/config.js): `config.js`

### Other components

- **Discord User**
- **Browser User**
- **Discord**

## Connections

- Bot Entry → Message Routing: registers (evidence: `index.js`)
- Bot Entry → Command Loader: loads (evidence: `index.js`)
- Bot Entry → Ready Handler: registers (evidence: `index.js`)
- Bot Entry → Crash Handler: registers (evidence: `index.js`)
- Bot Entry → Web Server: starts (evidence: `index.js`)
- Bot Entry → Bot Configuration: reads (evidence: `index.js`)
- Discord User → Message Routing: sends message (evidence: `handlers/messageCreate.js`)
- Message Routing → Command Loader: resolves command (evidence: `handlers/messageCreate.js`)
- Command Loader → Fun Commands: loads commands (evidence: `handlers/commandHandler.js`)
- Command Loader → Info Commands: loads commands (evidence: `handlers/commandHandler.js`)
- Message Routing → Fun Commands: dispatches (evidence: `handlers/messageCreate.js`)
- Message Routing → Info Commands: dispatches (evidence: `handlers/messageCreate.js`)
- Message Routing → Help Command: dispatches (evidence: `handlers/messageCreate.js`)
- Message Routing → Status Command: dispatches (evidence: `handlers/messageCreate.js`)
- Message Routing → Web Server: posts command logs (evidence: `handlers/messageCreate.js`)
- Status Command → Discord: sets activity (evidence: `commands/status.js`)
- Web Server → Bot Configuration: reads settings (evidence: `handlers/webServer.js`)
- Web Server → Web Interface: serves files (evidence: `handlers/webServer.js`)
- Browser User → Web Server: updates RPC (evidence: `README.md`)
- Web Server → Discord: sets activity (evidence: `handlers/webServer.js`)
- Web Server → Live Log Stream: emits logs (evidence: `handlers/webServer.js`)
- Live Log Stream → Browser User: streams logs (evidence: `README.md`)
- Message Routing → Discord: handles events (evidence: `handlers/messageCreate.js`)
- Ready Handler → Discord: reads client state (evidence: `handlers/ready.js`)
- Crash Handler → Discord: checks guild membership (evidence: `handlers/crash-handler.js`)
