# 📃 Custom Text

Create custom texts that are acessible with a single and unique command, such as /rules, /motd, etc.

## Commands & Permissions

* [Commands](https://nightexpress.gitbook.io/sunlight/general/commands#custom-text-module) link.
* [Permissions](https://nightexpress.gitbook.io/sunlight/general/permissions#custom-text-module) link.

## Features

* ✅ Unlimited amount of custom texts.
* ✅ Dedicated **command** for each custom text.
* ✅ Supports **hover** and **click** events.
* ✅ **PlaceholderAPI** support.

## Configuration

Custom texts located in the `/texts/` folder of the custom text module.

For every custom text file a dedicated command will be registered with the file name. **Example**: **rules.yml** will register **/rules** command.

{% code title="Default example - rules.yml" %}

```yaml
Description: Server rules.
Text:
- <red><b>ꜱᴜʀᴠɪᴠᴀʟ ʀᴜʟᴇꜱ</b></red>
- <dgray>▸</dgray> <lgray>ᴏꜰꜰᴇɴꜱɪᴠᴇ ʟᴀɴɢᴜᴀɢᴇ</lgray> <lgreen>[ᴡᴀʀɴ]</lgreen> <yellow>[ᴍᴜᴛᴇ]</yellow>
- <dgray>▸</dgray> <lgray>ꜱᴘᴀᴍᴍɪɴɢ/ꜰʟᴏᴏᴅɪɴɢ</lgray> <lgreen>[ᴡᴀʀɴ]</lgreen> <yellow>[ᴍᴜᴛᴇ]</yellow>
- <dgray>▸</dgray> <lgray>ᴛᴏxɪᴄɪᴛʏ</lgray> <lgreen>[ᴡᴀʀɴ]</lgreen> <yellow>[ᴍᴜᴛᴇ]</yellow>
- <dgray>▸</dgray> <lgray>ʜᴀʀᴀꜱꜱᴍᴇɴᴛ</lgray> <lgreen>[ᴡᴀʀɴ]</lgreen> <yellow>[ᴍᴜᴛᴇ]</yellow> <red>[ʙᴀɴ]</red>
- <dgray>▸</dgray> <lgray>ᴀᴅᴠᴇʀᴛɪꜱɪɴɢ</lgray> <lgreen>[ᴍᴜᴛᴇ]</lgreen> <yellow>[ʙᴀɴ]</yellow> <red>[ɪᴘ ʙᴀɴ]</red>
- <dgray>▸</dgray> <lgray>ꜱᴛᴇᴀʟɪɴɢ/ɢʀɪᴇꜰɪɴɢ</lgray> <lgreen>[ʙᴀɴ]</lgreen>
- <dgray>▸</dgray> <lgray>ꜱᴄᴀᴍᴍɪɴɢ</lgray> <lgreen>[ʙᴀɴ]</lgreen> <yellow>[ᴘᴇʀᴍ ʙᴀɴ]</yellow> <red>[ɪᴘ ʙᴀɴ]</red>
- ''
- <purple><b>ɪʟʟᴇɢᴀʟ ᴍᴏᴅɪꜰɪᴄᴀᴛɪᴏɴꜱ</b></purple>
- <dgray>▸</dgray> <lgray>xʀᴀʏ/ᴄʜᴇꜱᴛ ᴇꜱᴘ</lgray> <lgreen>[ʙᴀɴ]</lgreen>
- <dgray>▸</dgray> <lgray>ʜᴀᴄᴋᴇᴅ ᴄʟɪᴇɴᴛ</lgray> <lgreen>[ʙᴀɴ]</lgreen>
- <dgray>▸</dgray> <lgray>ɪʟʟᴇɢᴀʟ ᴍᴏᴅɪꜰɪᴄᴀᴛɪᴏɴꜱ</lgray> <lgreen>[ʙᴀɴ]</lgreen> <yellow>[ᴘᴇʀᴍ ʙᴀɴ]</yellow>
- <dgray>▸</dgray> <lgray>ᴄᴀᴠᴇ/ꜱᴇᴇᴅ ꜰɪɴᴅᴇʀꜱ</lgray> <lgreen>[ᴘᴇʀᴍ ʙᴀɴ]</lgreen>
- <dgray>▸</dgray> <lgray>ᴀᴜᴛᴏ ᴄʟɪᴄᴋᴇʀ</lgray> <lgreen>[ʙᴀɴ]</lgreen>
- <dgray>▸</dgray> <lgray>ᴅᴜᴘɪɴɢ</lgray> <lgreen>[ᴘᴇʀᴍ ʙᴀɴ]</lgreen> <yellow>[ɪᴘ ʙᴀɴ]</yellow>
- <dgray>▸</dgray> <lgray>ʙᴜɢ ᴀʙᴜꜱᴇ</lgray> <lgreen>[ᴘᴇʀᴍ ʙᴀɴ]</lgreen> <yellow>[ɪᴘ ʙᴀɴ]</yellow>
- <dgray>▸</dgray> <lgray>ᴡᴏʀʟᴅ ᴅᴏᴡɴʟᴏᴀᴅɪɴɢ</lgray> <lgreen>[ᴘᴇʀᴍ ʙᴀɴ]</lgreen> <yellow>[ɪᴘ ʙᴀɴ]</yellow>
```

{% endcode %}

`Description` used for the command description.

`Text` is what player will see when using custom text command.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nightexpress.gitbook.io/sunlight/modules/custom-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
