/settings command provides a centralized interface for server administrators to configure bot features and manage server-wide settings.
This command requires server administrator permissions.
Overview
The settings interface allows admins to:- Enable or disable bot features
- Configure feature-specific settings
- Manage active and inactive features
- Access bot information
Command Usage
- Must be used in a server (not DMs)
- Requires server administrator permissions
- Opens an interactive settings menu
Settings Interface
The settings menu presents a hierarchical interface with three main sections:1. Active Features
Shows all currently enabled features for the server:- Feeds: RSS feed subscription notifications
- Voice: Voice channel activity tracking
- Welcome: Welcome cards for new members
- Feature Settings Mode: Click a feature button to configure that feature’s specific settings
- Deactivate Features Mode: Toggle to disable mode, then click features to deactivate them
2. State Toggle
Switch between two modes:Feature Settings (default)
Feature Settings (default)
Button style: Blue (Primary)Purpose: Configure individual featuresAction: Clicking an active feature opens its configuration pageUse case: You want to adjust settings for an active feature
Deactivate Features
Deactivate Features
Button style: Red (Danger)Purpose: Disable featuresAction: Clicking an active feature immediately disables itUse case: You want to temporarily or permanently disable a featureToggle back: Click “Feature Settings” button to return to configuration mode
3. Add Features
Select menu showing inactive features that can be enabled:- Lists all features currently disabled for the server
- Select one or more features to activate them
- Newly activated features appear in the “Active Features” section
- Shows “All features enabled” when no inactive features remain
Available Features
Feeds
Description: RSS feed subscription and notification system Configuration: Opens/feed settings view
- Set notification channel
- Configure role permissions
- Enable/disable feed notifications
Voice
Description: Voice channel activity tracking and statistics Configuration: Opens/voice settings view
- Enable/disable voice tracking
Welcome
Description: Customizable welcome cards for new members Configuration: Opens/welcome settings view
- Enable/disable welcome cards
- Select welcome channel
- Choose card template (1-12)
- Set primary color
- Manage welcome messages
- Preview templates
- Template variables for personalization
- Multiple message rotation
- Visual preview generation
- Template selection (12 designs)
Navigation
The settings menu includes navigation buttons:- Feature Buttons: Click to configure (blue) or deactivate (red) based on current mode
- “Deactivate Features” / “Feature Settings”: Toggle between modes
- ”🛈 About”: View bot information and statistics
- ”❮ Back”: Return to main settings menu
- ”🛈 About”: View bot information
Permission Requirements
Requires server administrator permissions:
- Checked via
is_author_guild_admin()function - User must have admin rights in the server
- Cannot be used in DMs
Settings Workflow
Initial server setup
Initial server setup
- Admin runs
/settings - View current feature status
- Enable desired features using “Add Features” dropdown
- Click each active feature to configure its specific settings:
- Feeds: Set notification channel and permissions
- Voice: Ensure tracking is enabled
- Welcome: Configure welcome channel, template, and messages
- Settings are automatically saved
Enabling a new feature
Enabling a new feature
- Open
/settings - Find feature in “Add Features” dropdown
- Select the feature
- Feature appears in “Active Features”
- Click the feature to configure it
- Complete required configuration (e.g., channels)
Disabling a feature
Disabling a feature
- Open
/settings - Click “Deactivate Features” button (turns red)
- Click the feature you want to disable
- Feature is immediately disabled
- Click “Feature Settings” to return to normal mode
- Or enable it again via “Add Features” dropdown
Modifying feature settings
Modifying feature settings
- Open
/settings - Ensure you’re in “Feature Settings” mode (blue buttons)
- Click the feature you want to configure
- Adjust settings using the feature’s interface
- Changes are saved automatically
- Click ”❮ Back” to return to main settings
Settings Persistence
Auto-save Behavior
- Feature Enable/Disable: Saved immediately when toggled
- Feature-specific Settings: Saved when exiting the view (after clicking Back or timeout)
- Multi-select: Enabling multiple features at once is supported and saved
Settings Storage
- Stored in
ServerSettingsentity per guild - Persisted to SQLite database
- Settings structure:
Interactive Timeout
The settings interface remains active for 120 seconds after the last interaction. Behavior:- Countdown starts after command invocation
- Resets with each button click or selection
- After timeout:
- Buttons become disabled
- Settings remain saved
- Run
/settingsagain to continue configuring
Error Handling
Permission denied
Permission denied
Error: Check fails if user is not a guild adminMessage: Varies based on permission check implementationSolution: Only server administrators can access
/settingsGuild only
Guild only
Error:
BotError::GuildOnlyCommandMessage: “This command can only be used in a server.”Solution: Run the command in a server channel, not DMsConfiguration incomplete
Configuration incomplete
Warning: Feature enabled but not configured (e.g., no channel set)Effect: Users may see errors when trying to use the featureSolution: Click the feature in settings and complete required configuration
Best Practices
- Configure Before Enabling: Set up feature-specific settings immediately after enabling
-
Required Fields: Ensure required fields are set:
- Feeds: Notification channel
- Welcome: Welcome channel
- Role Permissions: Use role-based permissions for feeds to control who can subscribe
-
Test Features: After configuration:
- Feeds: Try subscribing to a test feed
- Voice: Join a voice channel to verify tracking
- Welcome: Check preview of welcome card
- Regular Review: Periodically check settings to ensure they match current server needs
Related Commands
/feed settings: Configure feed-specific settings/voice settings: Configure voice tracking settings/welcome: Configure welcome card settings/about: View bot information and statistics
Technical Details
Controller Implementation
Location:src/bot/commands/settings.rs
Key Components:
SettingsMainController: Manages main settings viewSettingsMainHandler: Handles interactions and stateSettingsMainState: Tracks current mode (FeatureSettings or DeactivateFeatures)