> For the complete documentation index, see [llms.txt](https://docs.nighty.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nighty.one/custom-features-tab/actions.md).

# Actions

Filters let the event in. Conditions confirmed it's the one you wanted. **Actions are where you finally tell Nighty what to do about it.**

## Actions run in order, top to bottom

Your actions are a list, and Nighty works through it **one at a time, from top to bottom**. Each action finishes completely before the next one starts.

So the order you put them in is the order they happen in. If you send a message and then react to it, the message exists by the time the reaction happens. Flip them around and it doesn't.

Three things that follow from this:

**If one action fails, the rest still run.** Say your second action tries to delete a message that's already gone. It fails, the reason goes into your feature's log, and Nighty moves straight on to the third action. One broken step doesn't throw away the whole list.

**Slow actions hold up the queue.** Anything that takes time - waiting, fetching, running a slash command - blocks the actions below it until it's done. Usually that's exactly what you want, and it's what makes the **Wait** action useful.

## Using the result of an action

Some actions hand you something back that later actions can use - an Action Ref:

This unlocks a lot. Once **Send Message** hands you the message it sent, later actions can react to it, edit it, pin it, or delete it - all in the same run.

**Example - a self-deleting notice:**

{% stepper %}
{% step %}

## Send Message

"Cleaning up in 10 seconds"\
Expose an action ref
{% endstep %}

{% step %}

## Wait

10 seconds
{% endstep %}

{% step %}

## Delete

The message from step 1.
{% endstep %}
{% endstepper %}

**Example - post an invite:**

{% stepper %}
{% step %}

## Create Invite

Expose a ref to the invite
{% endstep %}

{% step %}

## Send Message

Include the invite's link in the text using Expressions.
{% endstep %}
{% endstepper %}

Remember the ordering rule: you can only use a result **after** the action that produced it. Put them in the right order.
