Files

525 B

Chat Commands

Chat commands are modular and located in public/js/chat-commands/.

Adding a Command

  1. Create chat-commands/mycommand.js:
export const myCommand = {
  description: "What it does",
  execute: () => {
    const output = document.getElementById("terminal-output");
    // implementation
  },
};
  1. Import and register in commands.js:
import { myCommand } from "./chat-commands/mycommand.js";

const actions = {
  // ... existing commands
  "/mycommand": myCommand,
};