Overview
These commands fall into several categories:- Information: Display bot statistics and details
- Command Management: Register/unregister slash commands
- Owner Utilities: Database operations and owner-specific tools
- Welcome Configuration: Set up welcome cards for new members
User Commands
/about
Display comprehensive information about the bot including statistics, links, and version information. Permissions: Available to all users Usage:Statistics
Statistics
- Uptime: How long the bot has been running (days, hours, minutes)
- Servers: Number of servers the bot is in (formatted with k/M suffixes)
- Users: Total user count across all servers
- Commands: Total number of registered commands (including subcommands)
- Latency: Current Discord API latency in milliseconds
- Memory: Bot process memory usage in MB
Information
Information
- Author: FAZuH
- Source: GitHub Repository
- License: MIT
- Copyright: © 2025- FAZuH
- Version: Current bot version from config
- Bot avatar thumbnail
- Clickable links to source code and license
- ”< Back” button (when accessed from settings)
- Auto-refresh capability via controller navigation
- From main settings: Click ”🛈 About”
- Returns to settings when clicking ”< Back”
src/bot/commands/about.rs
The command gathers real-time statistics:
- Uptime from bot start time
- Server/user counts from Discord cache
- API latency via test request
- Memory from system process info
/welcome
Configure customizable welcome cards for new server members. Permissions: Server administrator recommended (though not explicitly enforced at command level) Usage:Toggle welcome cards on or off for the server.
- Enabled: New members receive welcome cards
- Disabled: No welcome cards are sent
Select the text channel where welcome cards will be posted.Must be a text channel. Required for welcome cards to function.
Choose from 12 pre-designed welcome card templates.
- Templates numbered 1-12
- Visual preview available via “Preview Templates” link
- Default: Template 1
Set the accent color for the welcome card.
- Format: Hex color code (e.g.,
#5865F2) - Opened via “Set Color” button
- Must include
#prefix
Manage a list of welcome messages (max 25).
- Messages are randomly selected when welcoming members
- Support template variables (see below)
- Max 200 characters per message
- Add via “Add Message” button (modal input)
- Remove via select menu + “Save Removals”
| Variable | Description | Example |
|---|---|---|
{{ username }} | User’s display name | ”JohnDoe” |
{{ user_tag }} | User’s handle | ”@johndoe” |
{{ server_name }} | Server name | ”My Awesome Server” |
{{ member_count }} | Total members | ”1,234” |
{{ member_number }} | Join position | ”#1234” |
{{ primary_color }} | Accent color | ”#5865F2” |
{{ welcome_message }} | Your greeting | Selected message |
- Selected template design
- Placeholder user data
- Your configured colors and messages
- Updated in real-time as settings change
-
Adding Messages:
- Click “Add Message” button
- Modal appears with text input
- Enter message (1-200 chars)
- Message added to list
-
Removing Messages:
- Select messages in dropdown (multi-select)
- Selected messages marked with ❌
- Click “Save Removals” to confirm
- Or “Cancel” to undo selection
- ”❮ Back”: Return to main settings
- ”🛈 About”: View bot information
- “Preview Templates”: Opens GitHub link with template previews
- Preview image:
welcome_preview.png - Attached to message when welcome is enabled
- Regenerated after each settings change
Server Admin Commands
/register
Register all bot slash commands to the current server. Permissions: Server administrator required Usage:This is a prefix command (not a slash command). You must type it with the bot’s prefix in a text channel.
- Checks user has administrator permissions
- Creates Discord command registration payload
- Registers all commands to the current guild
- Shows progress during registration
- Displays completion time and command count
- First-time bot setup in a server
- After bot updates that add new commands
- If commands aren’t appearing in Discord
- Troubleshooting command visibility issues
src/bot/commands/register.rs
/unregister
Remove all bot slash commands from the current server. Permissions: Server administrator required Usage:This is a prefix command (not a slash command). Type it with the bot’s prefix.
- Checks user has administrator permissions
- Clears all guild commands (sets to empty array)
- Shows progress during removal
- Displays completion time
- Removing bot commands before removing the bot
- Cleaning up command clutter
- Troubleshooting command issues
- Switching to global commands only
/register again to restore commands.
Implementation:
Location: src/bot/commands/unregister.rs
Owner-Only Commands
The following commands can only be used by bot owners specified in the bot configuration.
/register_owner
Register bot commands globally (owner version with UI selection). Permissions: Bot owner only (viaowners_only check)
Usage:
This is a prefix command. It’s hidden from help menus.
- Provides an interactive UI for command registration
- Uses Poise’s built-in registration buttons
- Allows registering commands globally or per-guild
- More flexible than
/registerfor development/testing
- Global command registration
- Development and testing
- Switching between global and guild commands
- Fine-grained control over command deployment
src/bot/commands/register_owner.rs
Uses: poise::builtins::register_application_commands_buttons()
/dump_db
Export complete database contents as JSON files. Permissions: Bot owner only Usage:This is a prefix command. It’s hidden from help menus.
- Queries all data from database tables
- Serializes data to pretty-printed JSON
- Attaches files to a Discord message
-
feeds.json: All registered RSS feeds
- Feed metadata
- Source URLs
- Platform information
-
feed_versions.json: Feed item history
- Individual feed items/versions
- Publication timestamps
- Item content
-
subscribers.json: All subscription targets
- User and guild subscribers
- Subscriber types and IDs
-
subscriptions.json: Active subscriptions
- Links between subscribers and feeds
- Subscription metadata
- Database backups
- Data migration
- Debugging subscription issues
- Analytics and reporting
- Disaster recovery
src/bot/commands/dump_db.rs
Permission Levels
Public Commands
✅ All users can access:/about- Bot information
Server Administrator
🔒 Requires admin permissions:/register- Register server commands/unregister- Remove server commands/settings- Configure bot features (including welcome via settings UI)
Bot Owner Only
🔐 Restricted to bot owners:/register_owner- Owner registration UI/dump_db- Database export
Common Workflows
Setting up bot in a new server
Setting up bot in a new server
- Server admin runs
/registerto enable slash commands - Admin runs
/settingsto configure features - Enable desired features (Feeds, Voice, Welcome)
- Configure each feature:
- Set required channels
- Configure permissions
- Test functionality
- Announce available commands to members
Configuring welcome cards
Configuring welcome cards
- Admin runs
/settings - Enable “Welcome” feature if not active
- Click “Welcome” to open configuration
- Set welcome channel (required)
- Choose a template (1-12)
- Set primary color (optional)
- Add welcome messages with template variables
- Preview the card design
- Enable welcome cards
- Test by having a user join (or leave and rejoin)
Backing up bot data
Backing up bot data
- Bot owner runs
/dump_dbin a secure channel - Download all attached JSON files
- Store securely (encrypted storage recommended)
- Document backup date and bot version
- Regular backups recommended (weekly/monthly)
Troubleshooting commands not appearing
Troubleshooting commands not appearing
- Verify bot has necessary permissions in the server
- Run
/unregisterto clear existing commands - Wait a few seconds
- Run
/registerto re-register commands - Restart Discord client if commands still don’t appear
- Check bot logs for registration errors
Error Handling
Permission denied
Permission denied
Error: Permission check failuresCommands affected:
/register, /unregister, /settingsSolution: User must have server administrator permissionsGuild only command
Guild only command
Error:
BotError::GuildOnlyCommandCommands affected: /register, /unregister, /settings, /welcomeSolution: Run the command in a server channel, not DMsOwner only command
Owner only command
Error:
owners_only check failureCommands affected: /register_owner, /dump_dbSolution: Only bot owners can use these commandsInvalid color format
Invalid color format
Error: Color doesn’t start with ’#’Command:
/welcome color settingSolution: Enter hex color with ’#’ prefix (e.g., #5865F2)Technical Details
Command Types
Slash Commands:/about: Standard slash command/welcome: Slash command with modal interactions
/register: Requires typing with bot prefix/unregister: Requires typing with bot prefix/register_owner: Owner-only prefix command/dump_db: Owner-only prefix command
Statistics Collection
The/about command gathers live statistics:
Welcome Card Generation
Location:src/bot/commands/welcome/image_generator.rs
Process:
- Fetch template design by ID (1-12)
- Replace template variables in messages
- Download/cache user avatar
- Composite text and images
- Apply primary color to accents
- Export as PNG
- Preview: Uses placeholder data (“PreviewUser”, “#100”, etc.)
- Real: Uses actual member data when user joins
- Templates are loaded once and reused
- Avatar images cached per user
- Preview regenerated on settings changes