Skip to content

[Feat] Configurable Command Aliases #43

Description

@derrickmehaffy

Summary

Allow server admins to configure custom command aliases in config, rather than relying on hardcoded aliases in subcommand constructors.

Features

Config-Driven Aliases

Add an aliases section to config.json:

{
  "commands": {
    "claim": { "aliases": ["c", "cl"] },
    "unclaim": { "aliases": ["uc", "uncl"] },
    "home": { "aliases": ["h", "tp"] },
    "sethome": { "aliases": ["sh", "setspawn"] },
    "create": { "aliases": ["new", "make"] },
    "disband": { "aliases": ["delete", "del"] },
    "invite": { "aliases": ["inv", "i"] },
    "accept": { "aliases": ["join", "acc", "j"] },
    "map": { "aliases": ["m", "territory"] },
    "info": { "aliases": ["show", "f"] },
    "admin": { "aliases": ["a", "adm"] }
  },
  "baseCommandAliases": ["f", "faction", "fac", "hf"]
}

AliasManager

  • Load aliases from config on startup and reload
  • Resolve alias → canonical command name
  • Get all aliases for a command (for help display)
  • Validate no conflicts between aliases

Help Integration

  • Show aliases in help output: /f claim (aliases: c, cl) — Claim territory
  • Tab completion should work with aliases

Base Command Aliases

  • Configure alternative base commands (e.g., /faction, /fac, /hf in addition to /f)

Current State

Aliases are currently hardcoded in individual subcommand constructors. This makes it impossible for server admins to customize shortcuts for their community.

Origin

Roadmap Phase A.5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions