{
"id": "online.timtinkers.bot.command",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"trigger",
"commandType",
"createdAt"
],
"properties": {
"rngMax": {
"type": "integer",
"description": "Maximum value for RNG (inclusive, required for rngCommand type)"
},
"rngMin": {
"type": "integer",
"description": "Minimum value for RNG (inclusive, required for rngCommand type)"
},
"trigger": {
"type": "string",
"maxLength": 50,
"minLength": 1,
"description": "The command trigger without prefix (e.g., 'socials', 'hug', 'd6')"
},
"response": {
"type": "string",
"maxLength": 3000,
"description": "Static response text (required for simpleCommand type)",
"maxGraphemes": 300
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"parameters": {
"type": "array",
"items": {
"ref": "#parameter",
"type": "ref"
},
"maxLength": 10,
"minLength": 1,
"description": "Parameter definitions (required for parameterizedCommand type)"
},
"commandType": {
"ref": "#commandType",
"type": "ref",
"description": "The type of command (simple, parameterized, or rng)"
},
"description": {
"type": "string",
"maxLength": 300,
"description": "Optional help text describing what the command does"
},
"rngTemplate": {
"type": "string",
"maxLength": 3000,
"description": "Template with {result} placeholder for RNG result and optional {paramName} for input (required for rngCommand type)",
"maxGraphemes": 300
},
"rngParameter": {
"ref": "#parameter",
"type": "ref",
"description": "Optional parameter definition for rngCommand type (e.g., target user for 'stinky' command)"
},
"responseFacets": {
"type": "array",
"items": {
"ref": "place.stream.richtext.facet",
"type": "ref"
},
"description": "Annotations of response text (mentions, URLs, etc)"
},
"responseTemplate": {
"type": "string",
"maxLength": 3000,
"description": "Template with {paramName} placeholders (required for parameterizedCommand type)",
"maxGraphemes": 300
},
"rngTemplateFacets": {
"type": "array",
"items": {
"ref": "place.stream.richtext.facet",
"type": "ref"
},
"description": "Annotations for RNG template text"
},
"responseTemplateFacets": {
"type": "array",
"items": {
"ref": "place.stream.richtext.facet",
"type": "ref"
},
"description": "Annotations for template text (mentions, URLs, etc). Indices should reference the template string before substitution."
}
}
},
"description": "Record representing a chat bot command. Commands can be simple (static response), parameterized (template-based with arguments), or RNG-based (random number generation)."
},
"parameter": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Parameter name used in template (e.g., 'target' for {target})"
},
"type": {
"enum": [
"string",
"handle",
"number"
],
"type": "string",
"description": "Expected parameter type for validation"
},
"required": {
"type": "boolean",
"default": true,
"description": "Whether this parameter must be provided"
},
"description": {
"type": "string",
"maxLength": 200,
"description": "Help text for this parameter"
}
},
"description": "Definition of a command parameter"
},
"rngCommand": {
"type": "token",
"description": "A command that generates a random number within a specified range and formats it using a template"
},
"commandType": {
"type": "string",
"knownValues": [
"online.timtinkers.bot.command#simpleCommand",
"online.timtinkers.bot.command#parameterizedCommand",
"online.timtinkers.bot.command#rngCommand"
]
},
"simpleCommand": {
"type": "token",
"description": "A command that returns a static response with no parameters"
},
"parameterizedCommand": {
"type": "token",
"description": "A command that accepts one or more parameters and uses a response template"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}