# online.timtinkers.bot.command

> Published by [bot.timtinkers.online](https://lexicon.garden/identity/did:plc:xnpibbj2hcqlsodutcnirmxp)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xnpibbj2hcqlsodutcnirmxp/online.timtinkers.bot.command)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xnpibbj2hcqlsodutcnirmxp/online.timtinkers.bot.command/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xnpibbj2hcqlsodutcnirmxp/online.timtinkers.bot.command/examples)

## Definitions

### `online.timtinkers.bot.command`

**Type**: `record`

Record representing a chat bot command. Commands can be simple (static response), parameterized (template-based with arguments), or RNG-based (random number generation).

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rngMax` | `integer` | No | Maximum value for RNG (inclusive, required for rngCommand type) |
| `rngMin` | `integer` | No | Minimum value for RNG (inclusive, required for rngCommand type) |
| `trigger` | `string` | Yes | The command trigger without prefix (e.g., 'socials', 'hug', 'd6') |
| `response` | `string` | No | Static response text (required for simpleCommand type) |
| `createdAt` | `string` (datetime) | Yes |  |
| `parameters` | `array` | No | Parameter definitions (required for parameterizedCommand type) |
| `commandType` | `ref` → `#commandType` | Yes | The type of command (simple, parameterized, or rng) |
| `description` | `string` | No | Optional help text describing what the command does |
| `rngTemplate` | `string` | No | Template with {result} placeholder for RNG result and optional {paramName} for input (required for rngCommand type) |
| `rngParameter` | `ref` → `#parameter` | No | Optional parameter definition for rngCommand type (e.g., target user for 'stinky' command) |
| `responseTemplate` | `string` | No | Template with {paramName} placeholders (required for parameterizedCommand type) |

### `online.timtinkers.bot.command#parameter`

**Type**: `object`

Definition of a command parameter

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Parameter name used in template (e.g., 'target' for {target}) |
| `type` | `string` | Yes | Expected parameter type for validation |
| `required` | `boolean` | No | Whether this parameter must be provided |
| `description` | `string` | No | Help text for this parameter |

### `online.timtinkers.bot.command#rngCommand`

**Type**: `token`

A command that generates a random number within a specified range and formats it using a template

A command that generates a random number within a specified range and formats it using a template

### `online.timtinkers.bot.command#commandType`

**Type**: `string`

**Known Values**:
- `online.timtinkers.bot.command#simpleCommand`
- `online.timtinkers.bot.command#parameterizedCommand`
- `online.timtinkers.bot.command#rngCommand`

### `online.timtinkers.bot.command#simpleCommand`

**Type**: `token`

A command that returns a static response with no parameters

A command that returns a static response with no parameters

### `online.timtinkers.bot.command#parameterizedCommand`

**Type**: `token`

A command that accepts one or more parameters and uses a response template

A command that accepts one or more parameters and uses a response template

## Raw Schema

```json
{
  "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)"
          },
          "responseTemplate": {
            "type": "string",
            "maxLength": 3000,
            "description": "Template with {paramName} placeholders (required for parameterizedCommand type)",
            "maxGraphemes": 300
          }
        }
      },
      "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": false,
          "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
}
```
