Files
trixie-api/contracts/v1/bot-command-argument-definition.json
ReaperOfVeriod 0400b12566
API checks / checks (push) Canceled after 0s
API dependency and security checks / audit (push) Canceled after 0s
Add typed command argument contract
2026-10-25 06:12:38 +01:00

18 lines
780 B
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.invalid/contracts/v1/bot-command-argument-definition.json",
"title": "Trixie typed bot command argument",
"type": "object",
"additionalProperties": false,
"required": ["name", "kind", "required"],
"properties": {
"name": { "type": "string", "pattern": "^[A-Za-z0-9_]{1,64}$" },
"kind": { "enum": ["text", "number", "choice", "username", "duration"] },
"required": { "type": "boolean" },
"default": { "type": ["string", "null"], "maxLength": 200 },
"minimum": { "type": ["integer", "null"] },
"maximum": { "type": ["integer", "null"] },
"choices": { "type": "array", "maxItems": 64, "items": { "type": "string", "minLength": 1, "maxLength": 200 } }
}
}