Scan content/commands/ for .toml files at startup and register them as commands alongside Python-defined ones. Two flavors: handler-based (points to a Python callable via module:function) and message-based (auto-generates a handler from inline text). Includes example MOTD command, type validation, error logging, and full test coverage.
17 lines
427 B
TOML
17 lines
427 B
TOML
name = "motd"
|
|
aliases = ["message"]
|
|
help = "display the message of the day"
|
|
mode = "*"
|
|
message = """
|
|
=== Message of the Day ===
|
|
|
|
Welcome to the MUD!
|
|
|
|
This is a procedurally generated world with seamless terrain wrapping.
|
|
Use cardinal directions (n, s, e, w) or diagonals (ne, nw, se, sw) to move.
|
|
|
|
Type 'help' for a list of commands.
|
|
Type 'fly' to toggle flying mode and soar over mountains and water.
|
|
|
|
Have fun exploring!
|
|
"""
|