Commands Reference

Complete reference for all LuaBeans - Community Manager Discord bot commands.

Command Categories

  • User Commands - Available to all users

  • Department Commands - Available to department leaders

  • Admin Commands - Available to admins only

User Commands

/ping

Bot health check - simple ping/pong test.

Usage:

/ping

Response:

pong

Permissions: Everyone

Use Case: Test if bot is online and responsive.


/verify

Get the LuaBeans login link via DM to verify your account.

Usage:

Response:

  • Sends DM with login link

  • Or displays link if DMs are disabled

Permissions: Everyone

Use Case: Get login link to access web panel for the first time.

Notes:

  • Link is sent via DM for privacy

  • If DMs are disabled, bot displays link in channel

  • Link is: https://your-domain.com/auth/discord


/whoami

Show your linked LuaBeans user account.

Usage:

Response:

Or if not linked:

Permissions: Everyone

Use Case: Check your account status and see if you're linked.


/syncme

Sync your Discord roles into LuaBeans department access.

Usage:

Response:

Permissions: Everyone

Use Case:

  • Refresh your department memberships

  • Update after receiving new Discord roles

  • Trigger role sync without logging into web panel

What it does:

  • Reads your Discord roles

  • Updates department memberships in database

  • Assigns LEO ranks based on Discord role mapping

  • Refreshes RBAC permissions


/checkroles

Show your Discord roles and mapped LuaBeans departments.

Usage:

Response:

Permissions: Everyone

Use Case:

  • Debug department access issues

  • See which Discord roles map to departments

  • Check for department blocks

Output includes:

  • All your Discord roles

  • Departments you're a member of (via role mapping)

  • Departments you're a leader of (via leadership roles)

  • Any department blocks


/badge

Generate a department badge image for yourself or another user.

Usage:

Options:

  • user (optional) - User to generate badge for (default: yourself)

  • department_slug (optional) - Department slug (required in DMs, optional in-server)

Examples:

Response:

  • Sends badge image as file attachment

  • Or shows error if badge can't be generated

Permissions: Everyone

Use Case:

  • Generate your badge for profile pictures

  • Create badges for department members

  • Download badge images

Badge Configuration:

  • Uses badge config from web panel

  • Supports template variables (see Badge Variables)

  • Requires department to have badge configured

Badge Variables: Available template variables:

  • {departmentCode} - Department code

  • {department_name} - Department full name

  • {department_slug} - Department slug

  • {rank_name} - User's rank name

  • {rank_order} - Rank order number

  • {badgeNumber} - User's badge number (if assigned)

  • {callsign} - User's callsign (if assigned)

  • {discord_username} - Discord username

  • {discord_displayName} - Discord display name

  • {discord_id} - Discord user ID

  • {luabeans_username} - LuaBeans username

  • {luabeans_userId} - LuaBeans user ID

  • {char_firstName} - ESX character first name (from roster)

  • {char_lastName} - ESX character last name (from roster)


Department Commands

These commands require department leadership or appropriate RBAC permissions.

/onboard

Onboard a user into the department (assigns first rank).

Usage:

Options:

  • user (required) - Discord user to onboard

Response:

Permissions:

  • Department leader

  • department.leader RBAC permission

  • department.leo.manage RBAC permission

  • Admin

Use Case:

  • Add new members to department

  • Assign first rank to new members

  • Add Discord role if configured

  • Create roster entry if enabled

What it does:

  1. Adds user to department membership

  2. Assigns lowest available rank (or specified rank)

  3. Adds Discord role (if rank has role configured)

  4. Creates roster entry (if auto-roster enabled)

Note: Command must be run in a Discord server paired to the department via RBAC.


/offboard

Remove a user from the department.

Usage:

Options:

  • user (required) - Discord user to offboard

Response:

Permissions:

  • Department leader

  • department.leader RBAC permission

  • department.leo.manage RBAC permission

  • Admin

Use Case:

  • Remove members from department

  • Remove all department roles and permissions

  • Clean up department membership

What it does:

  1. Removes user from department membership

  2. Removes LEO rank assignment

  3. Removes Discord role (if rank had role)

  4. Removes roster entry (if applicable)


/promote

Promote a user to a higher rank in the department.

Usage:

Options:

  • user (required) - Discord user to promote

Response:

Permissions:

  • Department leader

  • department.leader RBAC permission

  • department.leo.manage RBAC permission

  • Admin

Use Case:

  • Promote members within department

  • Advance members to next rank

  • Update rank-based permissions

What it does:

  1. Finds current rank

  2. Assigns next higher rank (by rank_order)

  3. Updates Discord role (if rank has role)

  4. Logs promotion in audit log

Notes:

  • Promotes to next rank only

  • If user is at highest rank, command may fail or do nothing

  • Rank order determines promotion sequence


/demote

Demote a user to a lower rank in the department.

Usage:

Options:

  • user (required) - Discord user to demote

Response:

Permissions:

  • Department leader

  • department.leader RBAC permission

  • department.leo.manage RBAC permission

  • Admin

Use Case:

  • Demote members within department

  • Lower rank for disciplinary reasons

  • Adjust rank-based permissions

What it does:

  1. Finds current rank

  2. Assigns next lower rank (by rank_order)

  3. Updates Discord role (if rank has role)

  4. Logs demotion in audit log

Notes:

  • Demotes to next rank only

  • If user is at lowest rank, command may fail or do nothing

  • Rank order determines demotion sequence


/announce

Create a LuaBeans announcement from Discord.

Usage:

Options:

  • title (required) - Announcement title (max 200 chars)

  • content (required) - Announcement content (max 1900 chars, markdown supported)

  • priority (optional) - normal, important, or urgent (default: normal)

  • pinned (optional) - Pin announcement (default: false)

  • department_slug (optional) - Post to specific department (admin only, default: global or your department)

Examples:

Response:

Permissions:

  • Global announcements: Admin only

  • Department announcements: Department leaders

Use Case:

  • Create announcements from Discord

  • Post updates without opening web panel

  • Quick notifications to department members

Content Support:

  • Markdown formatting supported

  • Links, lists, bold, italic, etc.

  • Same as web panel announcements


Admin Commands

/sync-members

Sync all server members' roles into LuaBeans (admin only).

Usage:

Response:

Permissions:

  • Admin (via ADMIN_DISCORD_IDS)

Use Case:

  • Bulk sync all server members

  • Refresh all user data at once

  • Fix sync issues after role changes

What it does:

  • Runs background job to sync all members

  • Updates department memberships for all users

  • Assigns LEO ranks based on Discord roles

  • Throttled to avoid rate limits (safe for ~5k users)

Notes:

  • Runs in background (non-blocking)

  • May take several minutes for large servers

  • Progress logged to console

  • Safe to run while bot is handling other requests


Command Permissions Summary

Command
Everyone
Department Leader
Admin

/ping

/verify

/whoami

/syncme

/checkroles

/badge

/onboard

/offboard

/promote

/demote

/announce

✅*

/sync-members

*Department leaders can only create announcements for their own department. Admins can create global announcements.

Troubleshooting Commands

Command Not Responding

Solutions:

  1. Check bot is online (green dot)

  2. Verify command spelling

  3. Check console for errors

  4. Try /ping to test bot connectivity

Permission Denied

Solutions:

  1. Verify you have required permissions

  2. Check if command requires department leadership

  3. Verify RBAC permissions in web panel

  4. Ensure Discord role permissions are correct

Command Not Found

Solutions:

  1. Wait for command registration (global: up to 1 hour)

  2. Redeploy commands: npm run bot:deploy

  3. Restart Discord client (cache may be stale)

  4. Verify bot has applications.commands scope

Errors in Response

Solutions:

  1. Check console logs for detailed errors

  2. Verify database connectivity

  3. Check web panel is running

  4. Verify user exists in database (use /syncme first)

Last updated