# Triggers

> What can start a Jellyn Lab system, and the values each trigger gives its blocks.

Every system starts from one **trigger**. The trigger decides who the run is *for* (`{user}`) and which [values](/developers/lab/values) the blocks after it can use.

## People in Discord

| Trigger | Starts when | Gives |
| --- | --- | --- |
| **A slash command** | Someone uses your server's own command, with its options | `{user}`, `{user.access}`, `{channel}`, the options as `{option.name}` |
| **A button in Discord** | Someone presses the button Jellyn posted (**Post button**) | `{user}`, `{user.access}`, `{channel}` |
| **Picked in /lab run** | Someone picks the system by name in `/lab run` | `{user}`, `{user.access}`, `{channel}` |
| **Run from the website** | Someone presses **Run now** in Jellyn Lab | `{user}`, `{server}` |

**Who can use it**: a command, a button or `/lab run` can be for **everyone**, **staff** or **management**.

### Command options

A command takes up to 10 **options**: text, number, true / false, member, channel or role. Required options come first, as Discord needs. Use them as `{option.reason}`; a member, channel or role also gives `{option.member.id}` and `{option.member.name}`. An optional option left empty is an empty value.

<Note>
  A command name is 1 to 32 lowercase letters, digits, `-` or `_`. Jellyn's own command names are taken, and a server can't have two systems with the same command.
</Note>

## Your team

| Trigger | Starts when | Gives |
| --- | --- | --- |
| **A shift starts** | A staff member starts a shift | `{user}` (the staff member) |
| **A shift ends** | A staff member ends a shift | `{user}`, `{shift.minutes}` |
| **A punishment is logged** | Someone logs a punishment | `{user}` (who logged it), `{player}`, `{case.number}`, `{case.action}`, `{case.reason}` |
| **A punishment log is voided** | Someone voids one | `{user}` (who voided it), and the case's values |
| **A staff infraction is issued** | Management issues one | `{user}` (who it is for), `{moderator}`, `{infraction.number}`, `{infraction.type}`, `{infraction.reason}` |
| **A staff infraction is revoked** | Management revokes one | the same as issued |

<Info>
  These start from the moment a system is turned on: what happened while it was off is not replayed.
</Info>

## Your ER:LC server

| Trigger | Starts when | Gives |
| --- | --- | --- |
| **A player joins the ER:LC server** | Someone joins your private server | `{player}`, `{player.id}`, and `{user}` if they verified |
| **A player leaves the ER:LC server** | Someone leaves | the same |
| **Someone runs an in-game command** | A player types the command you choose, with `:` or `;` | `{player}`, `{command}`, `{user}`, `{user.access}`, and its arguments as `{arg.name}` |

In game, `{user}` is the Discord account the player verified on Jellyn, and empty when they haven't. In-game commands have more to them: see [In-game commands](/developers/lab/in-game-commands).

## On a schedule

| Trigger | Starts | Gives |
| --- | --- | --- |
| **On a schedule** | Every 10 to 1440 minutes | `{server}` |

## Every run

Whatever starts it, every run also has `{server}`, `{server.id}`, `{server.members}`, `{server.owner}`, `{time.now}`, `{time.date}`, `{time.unix}` and `{random}`. A run that is for someone also has `{user.avatar}`, `{user.tag}`, `{user.created}` and `{user.joined}`. See [Values](/developers/lab/values).
