jaide-CommandAPI icon

CommandAPI

Framework for registering and handling slash commands — other mods depend on this to add /commands to chat

Last updated 3 days ago
Total downloads 75
Total rating 0 
Categories Libraries
Dependency string jaide-CommandAPI-1.0.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

CommandAPI for On-Together

framework for adding slash commands to On-Together — register commands from any mod, and they just work in chat

what it do

  • Intercepts chat messages starting with / and routes them to the right mod
  • Mods register commands with CommandRegistry.Register() — name, category, handler, description, and typed parameters
  • Handles argument validation, error messages, and sends feedback to chat
  • Other mods like ChatResizer, UIScaler, etc. depend on this to add their own commands

installation

mod manager installation (recommended)

  1. Install via mod manager (search "CommandAPI")
  2. Launch the game through ur favorite mod manager (r2modman, thunderstore, etc.)

manual installation

  1. Install BepInEx 5.x
  2. Extract CommandAPI.dll to BepInEx/plugins/
  3. Launch the game

for developers

add CommandAPI as a dependency and register your commands:

CommandRegistry.Register(
    name: "mycommand",
    category: "My Category", // UI, Gameplay, etc.
    handler: args => { /* do stuff */ },
    description: "does a thing",
    parameters: new Parameter[]
    {
        new Parameter("value", ParameterType.Float, isOptional: true)
    }
);

types available: String, Int, Float, Bool

CommandAPI handles the / prefix interception, argument splitting, and validation — your handler just gets a string[] of args.

credz

GigaPuff for a great game

jai.gay for the command api

gays for existing

changes

1.0.0

  • Initial release
  • Command registry, argument validation, chat notifications