> For the complete documentation index, see [llms.txt](https://nightexpress.gitbook.io/sunlight/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nightexpress.gitbook.io/sunlight/modules/custom-text.md).

# 📃 Custom Text

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

## Commands & Permissions

* [Commands](/sunlight/general/commands.md#custom-text-module) link.
* [Permissions](/sunlight/general/permissions.md#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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
