# Jellyn Lab

> Build your server's own slash commands, buttons and systems out of blocks on a canvas, and Jellyn runs them in your Discord and your ER:LC server.

<Info title="Early access">
  Jellyn Lab is in early access and not released yet. When your server is part of it, **Jellyn Lab** shows in your dashboard's sidebar. To hear when it opens up, turn on **Jellyn Lab Updates** under [Notifications](https://jellyn.xyz/notifications) on the website.
</Info>

Jellyn Lab lets a server build two kinds of **systems**:

<CardGroup cols={2}>
  <Card title="Commands" icon="square-slash">
    Slash commands only your server has, like `/welcome` or `/warn`, with their own options. Jellyn adds them to your Discord when you turn them on.
  </Card>
  <Card title="Events" icon="workflow">
    Systems that start by themselves: a shift, a punishment, a player joining ER:LC, an in-game command, a schedule, or a button Jellyn posts.
  </Card>
</CardGroup>

A system is a **trigger** (what starts it) and **blocks** joined on a canvas: **actions** that do something, and **conditions** that send the run one way or another.

## Your first system

<Steps>
  <Step title="Open Jellyn Lab">
    In your server's dashboard, open **Jellyn Lab**, and choose **New command** or **New event**.
  </Step>
  <Step title="Build it">
    Pick blocks from the list, or drag them onto the canvas. Drag from a block's dot to the next block, or to empty space to pick a new one. Change each block in the panel on the right.
  </Step>
  <Step title="Save, then turn it on">
    Saving turns a system off until you turn it on again from the list. A command shows up in your Discord within a few seconds. A button system needs **Post button**; a website system has **Run now**.
  </Step>
  <Step title="Watch it run">
    **Runs** shows how each run went, and why one stopped or failed.
  </Step>
</Steps>

## The builder

- **Block list**: tabs for **Options** (a command's options), **Actions** and **Conditions**, with search (press <kbd>/</kbd>), favourites and a compact mode.
- **Canvas**: the start block is raspberry, actions are blueberry, conditions are mint (with a red False output), and options are grape. `+` on a line inserts a block there; right-click to copy, duplicate, group or delete. Undo, redo, find, arrange, zoom and area select are in the toolbar.
- **Error paths**: an action block can have an **Error** output. When it fails, the run goes on there, with `{error}`, instead of stopping.
- **Custom data**: variables your systems remember between runs (text, number, collection, object), for the whole server or one per member or channel, written `{var.name}`.
- **Templates**: save picked blocks under a name and put them into any system of the same server.
- **Share codes**: a `JLAB_…` code copies a system to another server as a draft. Stored values, runs, channels and roles are never included.

## Limits

| | Early access | Labs+ |
| --- | --- | --- |
| Systems | 3 | 25 |
| Blocks a system | 8 | 30 |
| Runs an hour | 30 | 300 |
| Waiting in a run | 60 seconds | 300 seconds |

One run a server at a time. After a downgrade, only the oldest systems within the limit run.

## Safe by design

Lab turns off mentions in everything it sends, keeps channels and roles to your server, refuses managed and Administrator roles and roles above its own, and runs no code or web requests. A system started by an in-game command can't send another one, so systems can't set each other off forever.

<CardGroup cols={2}>
  <Card title="Triggers" icon="zap" href="/developers/lab/triggers">
    Everything that can start a system, and what each gives the blocks.
  </Card>
  <Card title="Blocks" icon="layout-grid" href="/developers/lab/blocks">
    Every action and condition.
  </Card>
</CardGroup>
