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:
/pingResponse:
pongPermissions: 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.leaderRBAC permissiondepartment.leo.manageRBAC permissionAdmin
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:
Adds user to department membership
Assigns lowest available rank (or specified rank)
Adds Discord role (if rank has role configured)
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.leaderRBAC permissiondepartment.leo.manageRBAC permissionAdmin
Use Case:
Remove members from department
Remove all department roles and permissions
Clean up department membership
What it does:
Removes user from department membership
Removes LEO rank assignment
Removes Discord role (if rank had role)
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.leaderRBAC permissiondepartment.leo.manageRBAC permissionAdmin
Use Case:
Promote members within department
Advance members to next rank
Update rank-based permissions
What it does:
Finds current rank
Assigns next higher rank (by
rank_order)Updates Discord role (if rank has role)
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.leaderRBAC permissiondepartment.leo.manageRBAC permissionAdmin
Use Case:
Demote members within department
Lower rank for disciplinary reasons
Adjust rank-based permissions
What it does:
Finds current rank
Assigns next lower rank (by
rank_order)Updates Discord role (if rank has role)
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, orurgent(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
/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:
Check bot is online (green dot)
Verify command spelling
Check console for errors
Try
/pingto test bot connectivity
Permission Denied
Solutions:
Verify you have required permissions
Check if command requires department leadership
Verify RBAC permissions in web panel
Ensure Discord role permissions are correct
Command Not Found
Solutions:
Wait for command registration (global: up to 1 hour)
Redeploy commands:
npm run bot:deployRestart Discord client (cache may be stale)
Verify bot has
applications.commandsscope
Errors in Response
Solutions:
Check console logs for detailed errors
Verify database connectivity
Check web panel is running
Verify user exists in database (use
/syncmefirst)
Related Documentation
Bot Setup - Installing and configuring the bot
Bot Events - Automatic event handlers
Bot Permissions - Required permissions
Last updated
