# gay.evil.superbot.defs

> Shared shapes for Superbot, a chat bot for Streamplace.

- Kind: defs
- Authority: superbot.evil.gay
- Lexicon: 1
- Published by [superbot.evil.gay](https://lexicon.garden/identity/did:plc:ulrdcgudase5ksj7cay2zhqt), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:ulrdcgudase5ksj7cay2zhqt/gay.evil.superbot.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:ulrdcgudase5ksj7cay2zhqt/gay.evil.superbot.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:ulrdcgudase5ksj7cay2zhqt/gay.evil.superbot.defs/analytics)

## #activity (`gay.evil.superbot.defs#activity`)

Type: object

A stream activity: a game from the catalog, or a Streamplace label.

### Properties

- `id` (string, required)
  - Constraints: maxLength: 1500, maxGraphemes: 500
- `kind` (string, required)
  - Constraints: knownValues: game | label
- `name` (string, required)
  - Constraints: maxLength: 600, maxGraphemes: 200

## #alert (`gay.evil.superbot.defs#alert`)

Type: object

### Properties

- `enabled` (boolean)
- `message` (string)
  - Constraints: maxLength: 1500, maxGraphemes: 500
- `onlineOnly` (boolean): Only send it while the stream is live.

## #blockedTerm (`gay.evil.superbot.defs#blockedTerm`)

Type: object

### Properties

- `conditions` (ref)
  - Reference: `#conditions`
- `enabled` (boolean)
- `expiry` (ref)
  - Reference: `#expiry`
- `id` (string)
  - Constraints: maxLength: 100
- `multiLine` (integer)
  - Constraints: minimum: 1, maximum: 10
- `phrase` (ref, required)
  - Reference: `#phrase`
- `pinned` (boolean)
- `punishment` (ref)
  - Reference: `#punishment`
- `targeting` (string)
  - Constraints: knownValues: message | username | both
- `useLookalikes` (boolean)

## #command (`gay.evil.superbot.defs#command`)

Type: object

A custom chat command, as carried in a preset. Matches gay.evil.superbot.command.

### Properties

- `aliases` (array)
  - Constraints: maxLength: 20
  - `items` (string)
    - Constraints: maxLength: 150, maxGraphemes: 50
- `conditions` (ref)
  - Reference: `#conditions`
- `enabled` (boolean)
- `expiry` (ref)
  - Reference: `#expiry`
- `globalCooldown` (integer)
  - Constraints: minimum: 0, maximum: 1209600
- `id` (string): Lets timers in the same preset refer to this command.
  - Constraints: maxLength: 100
- `keywords` (array)
  - Constraints: maxLength: 20
  - `items` (ref)
    - Reference: `#phrase`
- `name` (string, required)
  - Constraints: maxLength: 150, maxGraphemes: 50
- `response` (string)
  - Constraints: maxLength: 6000, maxGraphemes: 2000
- `responseType` (ref)
  - Reference: `#responseType`
- `userCooldown` (integer)
  - Constraints: minimum: 0, maximum: 1209600

## #conditions (`gay.evil.superbot.defs#conditions`)

Type: object

When something is allowed to trigger.

### Properties

- `activities` (array)
  - Constraints: maxLength: 50
  - `items` (ref)
    - Reference: `#activity`
- `excludedRoles` (array)
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 100
- `offline` (boolean): Trigger while the stream is offline.
- `online` (boolean): Trigger while the stream is live.
- `roles` (array): Roles allowed to trigger. Empty means everyone. Built-in roles are named (broadcaster, moderator, vip, follower, everyone); custom roles are opaque ids that only mean something to Superbot.
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 100
- `titleKeywords` (array)
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 300, maxGraphemes: 100

## #expiry (`gay.evil.superbot.defs#expiry`)

Type: object

### Properties

- `at` (string · datetime)
- `mode` (string)
  - Constraints: knownValues: none | disable | delete

## #filter (`gay.evil.superbot.defs#filter`)

Type: object

### Properties

- `conditions` (ref)
  - Reference: `#conditions`
- `config` (unknown): Settings for this filter type. Fractions are written as whole percentages, e.g. similarityPercent: 80.
- `enabled` (boolean)
- `id` (string)
  - Constraints: maxLength: 100
- `name` (string, required)
  - Constraints: maxLength: 300, maxGraphemes: 100
- `punishment` (ref)
  - Reference: `#punishment`
- `type` (string, required)
  - Constraints: knownValues: caps | commands | emoji | language | length | links | malware | height | oneman | repetition | symbols | thread | unique | zalgo

## #keyword (`gay.evil.superbot.defs#keyword`)

Type: object

Replies when chat matches a phrase group (every phrase in any one group).

### Properties

- `conditions` (ref)
  - Reference: `#conditions`
- `enabled` (boolean)
- `expiry` (ref)
  - Reference: `#expiry`
- `globalCooldown` (integer)
  - Constraints: minimum: 0, maximum: 1209600
- `id` (string)
  - Constraints: maxLength: 100
- `name` (string, required)
  - Constraints: maxLength: 300, maxGraphemes: 100
- `phraseGroups` (array, required)
  - Constraints: minLength: 1, maxLength: 20
  - `items` (ref)
    - Reference: `#phraseGroup`
- `response` (string)
  - Constraints: maxLength: 6000, maxGraphemes: 2000
- `responseType` (ref)
  - Reference: `#responseType`
- `targeting` (string)
  - Constraints: knownValues: message | username | both
- `userCooldown` (integer)
  - Constraints: minimum: 0, maximum: 1209600

## #phrase (`gay.evil.superbot.defs#phrase`)

Type: object

Text matched against a chat message.

### Properties

- `caseSensitive` (boolean)
- `position` (string)
  - Constraints: knownValues: start | anywhere | end | exact
- `regex` (boolean)
- `text` (string, required)
  - Constraints: maxLength: 3000, maxGraphemes: 1000
- `wordBoundary` (boolean)

## #phraseGroup (`gay.evil.superbot.defs#phraseGroup`)

Type: object

### Properties

- `phrases` (array, required)
  - Constraints: minLength: 1, maxLength: 20
  - `items` (ref)
    - Reference: `#phrase`

## #punishment (`gay.evil.superbot.defs#punishment`)

Type: object

What happens when a blocked term or spam filter matches. Durations are in seconds.

### Properties

- `action` (string)
  - Constraints: knownValues: delete | timeout | ban | warn | none
- `announcement` (object)
- `baseTimeout` (integer)
  - Constraints: minimum: 0, maximum: 1209600
- `maxTimeout` (integer)
  - Constraints: minimum: 0, maximum: 1209600
- `notify` (boolean)
- `reason` (string)
  - Constraints: maxLength: 900, maxGraphemes: 300
- `repeatOffenders` (object)
- `warnings` (object)

## #responseType (`gay.evil.superbot.defs#responseType`)

Type: string

How a reply is sent into chat.

Constraints: knownValues: say | reply | mention | pin

## #timer (`gay.evil.superbot.defs#timer`)

Type: object

A timer, as carried in a preset. Matches gay.evil.superbot.timer, except it names commands by preset id.

### Properties

- `activities` (array)
  - Constraints: maxLength: 50
  - `items` (ref)
    - Reference: `#activity`
- `commandIds` (array)
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 100
- `enabled` (boolean)
- `id` (string)
  - Constraints: maxLength: 100
- `messages` (array)
  - Constraints: maxLength: 5
  - `items` (string)
    - Constraints: maxLength: 6000, maxGraphemes: 2000
- `minLines` (integer)
  - Constraints: minimum: 0, maximum: 1000
- `name` (string, required)
  - Constraints: maxLength: 300, maxGraphemes: 100
- `offlineEnabled` (boolean)
- `offlineInterval` (integer): Minutes.
  - Constraints: minimum: 1, maximum: 1440
- `onlineEnabled` (boolean)
- `onlineInterval` (integer): Minutes.
  - Constraints: minimum: 1, maximum: 1440
- `titleKeywords` (array)
  - Constraints: maxLength: 50
  - `items` (string)
    - Constraints: maxLength: 300, maxGraphemes: 100

## #variable (`gay.evil.superbot.defs#variable`)

Type: object

A named phrase, used in keyword phrases as var:name. A value starting with regex: is a regular expression.

### Properties

- `description` (string)
  - Constraints: maxLength: 900, maxGraphemes: 300
- `enabled` (boolean)
- `id` (string)
  - Constraints: maxLength: 100
- `name` (string, required)
  - Constraints: maxLength: 50
- `value` (string)
  - Constraints: maxLength: 6000, maxGraphemes: 2000

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "activity": {
      "description": "A stream activity: a game from the catalog, or a Streamplace label.",
      "properties": {
        "id": {
          "maxGraphemes": 500,
          "maxLength": 1500,
          "type": "string"
        },
        "kind": {
          "knownValues": [
            "game",
            "label"
          ],
          "type": "string"
        },
        "name": {
          "maxGraphemes": 200,
          "maxLength": 600,
          "type": "string"
        }
      },
      "required": [
        "kind",
        "id",
        "name"
      ],
      "type": "object"
    },
    "alert": {
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "message": {
          "maxGraphemes": 500,
          "maxLength": 1500,
          "type": "string"
        },
        "onlineOnly": {
          "description": "Only send it while the stream is live.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "blockedTerm": {
      "properties": {
        "conditions": {
          "ref": "#conditions",
          "type": "ref"
        },
        "enabled": {
          "type": "boolean"
        },
        "expiry": {
          "ref": "#expiry",
          "type": "ref"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "multiLine": {
          "maximum": 10,
          "minimum": 1,
          "type": "integer"
        },
        "phrase": {
          "ref": "#phrase",
          "type": "ref"
        },
        "pinned": {
          "type": "boolean"
        },
        "punishment": {
          "ref": "#punishment",
          "type": "ref"
        },
        "targeting": {
          "knownValues": [
            "message",
            "username",
            "both"
          ],
          "type": "string"
        },
        "useLookalikes": {
          "type": "boolean"
        }
      },
      "required": [
        "phrase"
      ],
      "type": "object"
    },
    "command": {
      "description": "A custom chat command, as carried in a preset. Matches gay.evil.superbot.command.",
      "properties": {
        "aliases": {
          "items": {
            "maxGraphemes": 50,
            "maxLength": 150,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "conditions": {
          "ref": "#conditions",
          "type": "ref"
        },
        "enabled": {
          "type": "boolean"
        },
        "expiry": {
          "ref": "#expiry",
          "type": "ref"
        },
        "globalCooldown": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        },
        "id": {
          "description": "Lets timers in the same preset refer to this command.",
          "maxLength": 100,
          "type": "string"
        },
        "keywords": {
          "items": {
            "ref": "#phrase",
            "type": "ref"
          },
          "maxLength": 20,
          "type": "array"
        },
        "name": {
          "maxGraphemes": 50,
          "maxLength": 150,
          "type": "string"
        },
        "response": {
          "maxGraphemes": 2000,
          "maxLength": 6000,
          "type": "string"
        },
        "responseType": {
          "ref": "#responseType",
          "type": "ref"
        },
        "userCooldown": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "conditions": {
      "description": "When something is allowed to trigger.",
      "properties": {
        "activities": {
          "items": {
            "ref": "#activity",
            "type": "ref"
          },
          "maxLength": 50,
          "type": "array"
        },
        "excludedRoles": {
          "items": {
            "maxLength": 100,
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        },
        "offline": {
          "description": "Trigger while the stream is offline.",
          "type": "boolean"
        },
        "online": {
          "description": "Trigger while the stream is live.",
          "type": "boolean"
        },
        "roles": {
          "description": "Roles allowed to trigger. Empty means everyone. Built-in roles are named (broadcaster, moderator, vip, follower, everyone); custom roles are opaque ids that only mean something to Superbot.",
          "items": {
            "maxLength": 100,
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        },
        "titleKeywords": {
          "items": {
            "maxGraphemes": 100,
            "maxLength": 300,
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        }
      },
      "type": "object"
    },
    "expiry": {
      "properties": {
        "at": {
          "format": "datetime",
          "type": "string"
        },
        "mode": {
          "knownValues": [
            "none",
            "disable",
            "delete"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "filter": {
      "properties": {
        "conditions": {
          "ref": "#conditions",
          "type": "ref"
        },
        "config": {
          "description": "Settings for this filter type. Fractions are written as whole percentages, e.g. similarityPercent: 80.",
          "type": "unknown"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "name": {
          "maxGraphemes": 100,
          "maxLength": 300,
          "type": "string"
        },
        "punishment": {
          "ref": "#punishment",
          "type": "ref"
        },
        "type": {
          "knownValues": [
            "caps",
            "commands",
            "emoji",
            "language",
            "length",
            "links",
            "malware",
            "height",
            "oneman",
            "repetition",
            "symbols",
            "thread",
            "unique",
            "zalgo"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "name"
      ],
      "type": "object"
    },
    "keyword": {
      "description": "Replies when chat matches a phrase group (every phrase in any one group).",
      "properties": {
        "conditions": {
          "ref": "#conditions",
          "type": "ref"
        },
        "enabled": {
          "type": "boolean"
        },
        "expiry": {
          "ref": "#expiry",
          "type": "ref"
        },
        "globalCooldown": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "name": {
          "maxGraphemes": 100,
          "maxLength": 300,
          "type": "string"
        },
        "phraseGroups": {
          "items": {
            "ref": "#phraseGroup",
            "type": "ref"
          },
          "maxLength": 20,
          "minLength": 1,
          "type": "array"
        },
        "response": {
          "maxGraphemes": 2000,
          "maxLength": 6000,
          "type": "string"
        },
        "responseType": {
          "ref": "#responseType",
          "type": "ref"
        },
        "targeting": {
          "knownValues": [
            "message",
            "username",
            "both"
          ],
          "type": "string"
        },
        "userCooldown": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "name",
        "phraseGroups"
      ],
      "type": "object"
    },
    "phrase": {
      "description": "Text matched against a chat message.",
      "properties": {
        "caseSensitive": {
          "type": "boolean"
        },
        "position": {
          "knownValues": [
            "start",
            "anywhere",
            "end",
            "exact"
          ],
          "type": "string"
        },
        "regex": {
          "type": "boolean"
        },
        "text": {
          "maxGraphemes": 1000,
          "maxLength": 3000,
          "type": "string"
        },
        "wordBoundary": {
          "type": "boolean"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    },
    "phraseGroup": {
      "properties": {
        "phrases": {
          "items": {
            "ref": "#phrase",
            "type": "ref"
          },
          "maxLength": 20,
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "phrases"
      ],
      "type": "object"
    },
    "punishment": {
      "description": "What happens when a blocked term or spam filter matches. Durations are in seconds.",
      "properties": {
        "action": {
          "knownValues": [
            "delete",
            "timeout",
            "ban",
            "warn",
            "none"
          ],
          "type": "string"
        },
        "announcement": {
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "message": {
              "maxGraphemes": 500,
              "maxLength": 1500,
              "type": "string"
            }
          },
          "type": "object"
        },
        "baseTimeout": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        },
        "maxTimeout": {
          "maximum": 1209600,
          "minimum": 0,
          "type": "integer"
        },
        "notify": {
          "type": "boolean"
        },
        "reason": {
          "maxGraphemes": 300,
          "maxLength": 900,
          "type": "string"
        },
        "repeatOffenders": {
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "multiplierPercent": {
              "description": "Timeout multiplier per repeat offence, as a percentage (200 doubles it).",
              "maximum": 1000,
              "minimum": 100,
              "type": "integer"
            },
            "window": {
              "maximum": 1209600,
              "minimum": 0,
              "type": "integer"
            }
          },
          "type": "object"
        },
        "warnings": {
          "properties": {
            "count": {
              "maximum": 10,
              "minimum": 1,
              "type": "integer"
            },
            "enabled": {
              "type": "boolean"
            },
            "message": {
              "maxGraphemes": 500,
              "maxLength": 1500,
              "type": "string"
            },
            "window": {
              "maximum": 1209600,
              "minimum": 0,
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "responseType": {
      "description": "How a reply is sent into chat.",
      "knownValues": [
        "say",
        "reply",
        "mention",
        "pin"
      ],
      "type": "string"
    },
    "timer": {
      "description": "A timer, as carried in a preset. Matches gay.evil.superbot.timer, except it names commands by preset id.",
      "properties": {
        "activities": {
          "items": {
            "ref": "#activity",
            "type": "ref"
          },
          "maxLength": 50,
          "type": "array"
        },
        "commandIds": {
          "items": {
            "maxLength": 100,
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "messages": {
          "items": {
            "maxGraphemes": 2000,
            "maxLength": 6000,
            "type": "string"
          },
          "maxLength": 5,
          "type": "array"
        },
        "minLines": {
          "maximum": 1000,
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "maxGraphemes": 100,
          "maxLength": 300,
          "type": "string"
        },
        "offlineEnabled": {
          "type": "boolean"
        },
        "offlineInterval": {
          "description": "Minutes.",
          "maximum": 1440,
          "minimum": 1,
          "type": "integer"
        },
        "onlineEnabled": {
          "type": "boolean"
        },
        "onlineInterval": {
          "description": "Minutes.",
          "maximum": 1440,
          "minimum": 1,
          "type": "integer"
        },
        "titleKeywords": {
          "items": {
            "maxGraphemes": 100,
            "maxLength": 300,
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "variable": {
      "description": "A named phrase, used in keyword phrases as var:name. A value starting with regex: is a regular expression.",
      "properties": {
        "description": {
          "maxGraphemes": 300,
          "maxLength": 900,
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "name": {
          "maxLength": 50,
          "type": "string"
        },
        "value": {
          "maxGraphemes": 2000,
          "maxLength": 6000,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    }
  },
  "description": "Shared shapes for Superbot, a chat bot for Streamplace.",
  "id": "gay.evil.superbot.defs",
  "lexicon": 1
}
```
