> For the complete documentation index, see [llms.txt](https://docs.moodymusic.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.moodymusic.xyz/features/no-prefix-access.md).

# No-Prefix Access

No-prefix access allows designated users to control Moody Music without typing a command prefix.

## How It Works

When a user has no-prefix access, the bot interprets their messages as commands directly. Instead of typing:

```
mplay song name
```

They can simply type:

```
play song name
```

## Access Types

| Type     | Description                                               |
| -------- | --------------------------------------------------------- |
| **USER** | A specific Discord user ID is granted no-prefix access    |
| **ROLE** | All members with a specific role ID gain no-prefix access |

## Granting Access

No-prefix entries are managed by bot owners and administrators. Each entry can have:

* A target (user ID or role ID)
* An optional expiration time
* A `nopDisabled` flag to temporarily suspend access without removing the entry

## Expiration

No-prefix entries can be time-limited. When an entry expires:

* The user or role loses no-prefix access
* The bot sends a DM notification to the affected user (for USER-type entries)
* The record is automatically cleaned from the database

## Caching

To keep latency low, no-prefix status is cached in Redis:

* Valid access is cached for 1 hour
* Negative lookups are cached for 30 seconds to quickly reflect admin changes
* Cache is invalidated on entry creation, modification, or deletion
