ZMN Bot Documentation
Setup guides and configuration reference for every ZMN module — security, moderation, roles, leveling, and access control.
Quick Navigation
Access Control
Manage who can access and modify your server dashboard
Overview
Dashboard Access lets the server owner choose who else can open this server's dashboard: allowed users and allowed roles get full access, and Module Per User gives a member only the modules picked for them. Only the owner can change these settings.
Why Access Control?
- • Delegate dashboard management to trusted staff members
- • Grant access without giving Discord server permissions
- • Give a member access to just the modules they need (Module Per User)
- • Maintain security while enabling collaboration
Key Features
User-Based Access
Grant dashboard access to specific users by their Discord ID
Role-Based Access
Allow entire roles to access the dashboard
Owner Priority
Server owners always have full access regardless of settings
Secure by Default
When disabled, only the server owner can access the dashboard
How It Works
1User Attempts Access
When a user tries to open your server dashboard, the system checks their permissions.
2Owner Check
First, the system checks whether the user is the server owner. The owner always has full access and skips every other check.
3Access Control Check
If Access Control is on, the system checks the allowed users list, then the allowed roles, then Module Per User.
4Grant or Deny
Allowed users and allowed roles get full access. A Module Per User entry opens only the modules it lists. If nothing matches, they see an access denied message.
Access Hierarchy
The system checks permissions in this order:
1. Server Owner
The Discord server owner always has full access. This cannot be turned off or overridden.
2. Allowed Users
If User Access is on, users in the allowed list get access straight away.
3. Allowed Roles
If Role Access is on, members with any of the allowed roles get access. A role grant is always full access.
4. Module Per User
A member listed here can open only the modules chosen for them, and sees only those modules' data. Server-wide pages (overview, statistics, general settings) stay with the owner and full-access users.
5. Access Denied
If none of the checks above pass, access is denied with an error message.
Configuration
Main Toggle
Enable Access Control
toggleTurn on dashboard access control. When it is off, only the server owner can open the dashboard.
User Access
Give access to specific users by their Discord ID. Useful for trusted people who may not have a staff role.
Enable User Access
toggleAllow specific users to open the dashboard
Allowed Users
user-searchSearch and add users by username, display name or Discord ID
Role Access
Give access to every member with specific roles. Ideal for staff teams and management roles.
Enable Role Access
toggleAllow members with specific roles to open the dashboard
Roles with full access
rolesMembers with these roles get full dashboard access (free plan: 1 role)
Module Per User
Give a member access to chosen modules only, for example just Welcoming or just Ticketing. This is the only way to limit someone to part of the dashboard; a role grant is always full access.
Module Users
user + modulesPick a member and the modules they may manage (free plan: 3 members)
User Search
User search lets you find members and add them to the allowed list easily:
Search by username
Type the user's Discord username to find them
Search by display name
Search using the user's server nickname
Search by Discord ID
Paste the user's Discord ID (17-20 digits) for an exact match
Backend Validation
Access control is enforced at several levels for maximum security:
Frontend Check
The dashboard checks permissions before showing any content, so feedback is immediate.
API Middleware
Every API request is validated by the checkDashboardAccess middleware, which verifies the user's Discord token and checks their permissions against the database.
Shard Manager Integration
The system queries Discord's API through the bot's shard manager to verify ownership and fetch live role information.
Redis Caching
Access decisions are cached in Redis for fast validation. Saving a change clears the cache straight away, so it applies on the member's next request (an open dashboard may need a refresh). Discord role changes and ownership transfers can take up to a minute to show.
Use Cases
Scenario 1: Staff team access
Goal: Let every moderator and administrator manage the bot.
Setup: Turn on Role Access and add your "Moderator" and "Admin" roles to the full-access roles.
Result: Anyone with these roles can open the dashboard without being added one by one.
Scenario 2: Specific user access
Goal: Give access to a trusted member who doesn't have a staff role.
Setup: Turn on User Access and add their Discord ID to the allowed users list.
Result: That user can open the dashboard whatever roles they have.
Scenario 3: Mixed approach
Goal: Allow staff roles plus a few specific users.
Setup: Turn on both User Access and Role Access. Add the staff roles and the specific user IDs.
Result: Anyone with a staff role OR on the users list can open the dashboard.
Scenario 4: Owner-only mode
Goal: Keep dashboard access to the server owner only.
Setup: Turn Access Control off completely.
Result: Only the server owner can open the dashboard. Maximum security.
Best Practices
✓ Recommended
- • Use role-based access for staff teams (easier to manage)
- • Add specific users only when they don't fit a role
- • Review the allowed users and roles regularly
- • Remove access as soon as a staff member leaves
- • Use clear role names that show what each role is for
✗ Avoid
- • Don't add @everyone or large public roles to the full-access roles
- • Don't share dashboard access with members you don't trust
- • Don't forget to remove access when someone leaves your team
- • Don't use per-user access for large teams (use roles instead)
Security Considerations
Dashboard vs Discord permissions
Dashboard access is separate from Discord server permissions. A user can have dashboard access without any Discord permissions, and the other way round. This lets you hand over bot management without giving server admin rights.
Owner Protection
The server owner can never be locked out. Even if every access setting is misconfigured, the owner always keeps full access to fix it.

