# How to block or allow certain words

Specific words that are sent by users can be blocked or allowed using the **advanced auto moderation** module.

## <span class="number-replacement">1.</span> <img src="/_media/icons/one.png" alt="step one" style="vertical-align: -8px;" class="step"/> Add a group
1. Navigate to the <img src="https://dashboard.sapph.xyz/assets/item-icons/auto-moderation.svg" alt="" style="vertical-align: middle; width: 16px;"> **Auto Moderation module** ➜ <img src="https://dashboard.sapph.xyz/assets/icons/filter.svg" alt="" style="vertical-align: middle; width: 19px;"> **Advanced auto moderation**.
2. Click `+ Add group` inside the **Words** tile.

## <span class="number-replacement">2.</span> <img src="/_media/icons/two.png" alt="step two" style="vertical-align: -8px;" class="step"/> Add words to the group
1. Enter words into the `New word` input field, and click the `+` next to the field to fully add the word.

## <span class="number-replacement">3.</span> <img src="/_media/icons/three.png" alt="step three" style="vertical-align: -8px;" class="step"/> Define actions and requirements
Set what happens when a user sends a message containing the word(s).

1. Under **Conditions**, click `Add condition`.
2. Choose when the condition (with its actions) should be triggered.
    - The default is ≥ 1 message (every message)
3. Click `+` next to the **No actions added** to add actions.
    - This can be `Delete messages`, `Send message`, `Open moderation case` and so on.

i> A condition is always deleted after saving if it has no effect on anything. Make sure to add everything correctly.

## <span class="number-replacement">4.</span> <img src="/_media/icons/four.png" alt="step four" style="vertical-align: -8px;" class="step"/> Additional options
Click the expanded arrows (<img src="https://dashboard.sapph.xyz/images/expand-arrows.svg" alt="" style="vertical-align: middle; width: 16px;">) icon next to a group to reveal more options.

- **Regular expression**: Make use of regular expression (regex) for advanced word detection.
    - **RegEx Limitation:** Sapphire does not support negative lookahead (`(?!...)`) and negative lookbehind (`(?<!...)`) in regular expressions. Using these features will result in an "Unknown Error" when attempting to save trigger words. Use alternative RegEx patterns instead.
- **Word groups**: Group words together and require a specific number of them to appear to trigger the condition.
- **Export words**: Export the words list as text or JSON Array.
- **Import words**: Import words from a text/file or other bots.
- **Ignore capitalization**: If enabled, Sapphire will ignore when the words are capitalized (E.g. `word` will also match `Word` or `WORD`).
- **Require spaces**: If enabled, Sapphire will only recognize words that stand alone, separately (between spaces). You can also add spaces manually to single words to just require spaces for them.