> 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/safe-mode.md).

# Safe mode

**Safe mode lets you test a feature without it doing anything to Discord.**

<figure><img src="/files/I8BxhmdVNcm3EInpVO8V" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
It is **enabled by default** on every new feature, and that default is there for a reason.
{% endhint %}

## What it does

Your feature runs completely normally. The event fires, filters are checked, conditions are evaluated - everything behaves exactly as it will in real use.

Then, at the very moment it's time to carry out your actions, Nighty **stops** and instead shows a notification in the **overview** tab telling you that your actions were about to run.

Nothing is sent. Nothing is deleted. Nobody is banned. You just get told it *would* have happened.

{% hint style="info" %}
**This is a dress rehearsal with real events.** You can point a feature that bans people at a real server and watch it decide who it would ban, without anyone being banned.
{% endhint %}

It covers **every** action in your feature - the final actions, and the "If met" and "Otherwise" actions inside your condition collections. Nothing slips through.

## How to actually test with it

Turn the feature on with safe mode enabled, then **go and live your normal Discord life** for a while. Watch the notifications in the overview tab.

You're looking for one thing: **does it fire when it should, and stay quiet when it shouldn't?**

### ✅ What good looks like

Notifications appear only in the situations you built the feature for. You send a test message that should trigger it - a notification. You chat normally - silence.

### 🚨 What bad looks like

**Notifications are spamming.**

{% hint style="warning" %}
**If safe mode is producing a stream of notifications, something is wrong.** Your feature is triggering far more often than you intended. Turn safe mode off now and it would be spamming Discord, hitting rate limits, or acting on people you never meant to touch.
{% endhint %}

Spam is not a safe-mode problem - it's your feature telling you it's misconfigured, in the only way that can't hurt you. Treat it as the warning it is.

### What spam usually means

| Symptom                                        | Likely cause                                         |
| ---------------------------------------------- | ---------------------------------------------------- |
| Fires on **every** message                     | No conditions, or conditions that almost always pass |
| Fires on things you sent yourself              | Missing **Ignore self** filter                       |
| Fires in servers or channels you didn't intend | No whitelist filter                                  |
| Fires on bot messages                          | Missing **Ignore bots** filter                       |
| Fires several times per event                  | Your conditions match more broadly than you think    |
| Fires steadily forever                         | A loop - it's re-triggering on its own output        |

Fix the cause, then watch again. Repeat until it's quiet.

## Turning it off

{% hint style="success" %}
✅ **Only disable safe mode once you have fully tested the feature.**
{% endhint %}

Before you do, run through this:

* [ ] It fired **every** time it should have
* [ ] It stayed quiet every time it shouldn't have
* [ ] The notifications weren't spamming
* [ ] It has **Ignore self**&#x20;
* [ ] It has a sensible execution limit
* [ ] Its filters restrict it to the servers and channels you intended
* [ ] You've read the feature's log and there are no errors in it
* [ ] You're comfortable with what happens if it fires when you didn't expect - especially for anything irreversible: ban, kick, delete, purge, leave

If any of those is a no, leave safe mode on and keep working.

### Straight after turning it off

Watch the first few real runs closely and **check the log**. This is the first time your action expressions actually get worked out, so it's the first chance for a mistake in them to surface.

If anything looks wrong, turn safe mode back on or disable the feature immediately. You can toggle it as often as you like.\
For emergency: close Nighty and contact support.
