/voice (aliased as /vc) command group tracks voice channel activity and provides statistics and leaderboards for server members.
The command uses the alias
/vc for convenience. Both /voice and /vc work identically.Overview
Voice tracking features:- Automatic tracking: Records time spent in voice channels
- Leaderboards: Ranked lists by voice activity
- Statistics: Daily activity visualizations and charts
- User & server stats: View individual or server-wide data
Subcommands
/vc leaderboard
Display a ranked leaderboard of users by total time spent in voice channels.Time period to filter voice activity:
Today: From 00:00 UTC today until nowPast 24 hours: Last 24 hoursPast 72 hours: Last 72 hoursPast 7 days: Last 7 daysPast 14 days: Last 14 daysThis month: From 1st of current month until nowThis year: From January 1st until nowAll time: Complete history
- Pagination: Browse through entries 10 at a time
- Your Rank: Shows your position and total time at the top
- Visual Leaderboard: Generated as an image with rankings
- Time Filtering: Interactive buttons to change time ranges
- Real-time Updates: Click time range buttons to refresh data
- Rank position
- Username
- Total voice time (formatted as hours/minutes)
- Visual ranking indicators
/vc stats
Display detailed voice activity statistics with contribution graphs and charts.Time period and granularity:
Yearly: Last 365 days, aggregated by monthMonthly: Last ~4 months, aggregated by dayWeekly: Last 4 weeks, aggregated by dayHourly: Last 4 days, aggregated by hour
User to show stats for. Defaults vary by context:
- In server: Shows server-wide stats unless a user is specified
- In DM: Shows your own stats (cannot view others)
When viewing another user’s stats in a server, the bot verifies they are a member.
For server-wide view, which statistic to display:
Average Time: Average voice time per active userActive Users: Number of unique active usersTotal Time: Total voice time across all users
-
Contribution Graph: GitHub-style heatmap showing daily activity
- Color intensity represents activity level
- Hover/view tooltip-style info (in image)
-
Line Chart: Time series graph showing trends
- X-axis: Time periods (hours, days, weeks, or months)
- Y-axis: Duration or user count depending on stat type
- Multiple lines for comparing different time periods
- Time Range Buttons:
Yearly,Monthly,Weekly,Hourly - Statistic Buttons (server view):
Unique Users,Total Time,Average Time - User Select: Dropdown to switch between viewing different users
- Toggle Data Mode: Switch between contribution graph and line chart
- Target (username or server name)
- Selected time range
- Total voice time in the period
- Contribution graph or line chart (PNG image)
/vc stats_chart
This is a specialized subcommand. Details are similar to
/vc stats but focused on chart generation.
See source code at src/bot/commands/voice/stats_chart.rs for implementation details./vc settings
Configure voice tracking settings for the server. Administrator permissions required.This command requires
ADMINISTRATOR or MANAGE_GUILD permissions.- Enable/Disable Voice Tracking
- Toggle voice activity tracking on or off
- When disabled, the bot stops recording voice channel sessions
- Existing data is preserved
- Shows current status (active or paused)
- Toggle button to enable/disable
- Navigation buttons:
- ”❮ Back” to return to main settings
- ”🛈 About” to view bot information
Time Range Options
Leaderboard Time Ranges
| Option | Description | Calculation |
|---|---|---|
| Today | Current day | From 00:00 UTC today |
| Past 24 hours | Last 24 hours | Now - 24 hours |
| Past 72 hours | Last 3 days | Now - 72 hours |
| Past 7 days | Last week | Now - 7 days |
| Past 14 days | Last 2 weeks | Now - 14 days |
| This month | Current month | From 1st of month 00:00 |
| This year | Current year | From Jan 1st 00:00 |
| All time | Complete history | From earliest record |
Stats Time Ranges
| Option | Duration | Granularity | Use Case |
|---|---|---|---|
| Yearly | 365 days | Monthly | Long-term trends |
| Monthly | ~4 months | Daily | Medium-term patterns |
| Weekly | 4 weeks | Daily | Recent activity |
| Hourly | 4 days | Hourly | Detailed breakdown |
Statistic Types (Server View)
Average Time
Average Time
Formula: Total voice time ÷ Number of active usersUse case: See how engaged the average user isCalculation: For each time period, divides total seconds by unique user count
Active Users
Active Users
Formula: Count of unique users with voice activityUse case: Track server population and engagementCalculation: Counts distinct user IDs with sessions in each period
Total Time
Total Time
Formula: Sum of all voice session durationsUse case: See overall server voice activityCalculation: Aggregates all session durations for each period
Permissions
User Permissions
- View Leaderboards: All server members
- View Own Stats: All users (in server or DM)
- View Others’ Stats: All server members (only for members of that server)
Admin Permissions
/vc settings: RequiresADMINISTRATORorMANAGE_GUILDpermission
Common Workflows
Setting up voice tracking
Setting up voice tracking
- Server admin runs
/vc settings - Ensure voice tracking is enabled
- Bot automatically tracks all voice channel joins/leaves
- Users can view stats immediately (if any activity exists)
Viewing your activity
Viewing your activity
- Run
/vc statsto see your contribution graph - Change time range with interactive buttons
- Toggle to line chart view for trend analysis
- Compare different time periods
Checking your rank
Checking your rank
- Run
/vc leaderboard - Your rank appears at the top
- Scroll through pages to see others
- Change time range to see different rankings
Comparing server activity
Comparing server activity
- Run
/vc stats(without specifying a user) - View server-wide statistics
- Switch between statistic types:
Average Time: User engagement levelActive Users: Community sizeTotal Time: Overall activity
- Adjust time ranges to identify trends
Technical Details
Data Collection
- Session Recording: Bot records join and leave times for voice channels
- Duration Calculation:
leave_time - join_timecapped at 24 hours max - Active Sessions: Users still in voice are counted up to current time
Image Generation
- Contribution Graphs: Generated using the
contribution_gridcrate - Line Charts: Created with the
plotterscrate - File Format: PNG images attached to Discord messages
- Caching: Generated on-demand per request
Performance
- Leaderboard: Queries limited to
u32::MAXentries, then paginates client-side - Stats: Aggregates data before chart generation to reduce memory usage
- Timeouts: Interactive views timeout after 120 seconds of inactivity
Error Messages
User not in guild
User not in guild
Error: “The specified user is not a member of this server.”Cause: Trying to view stats for a user not in the current serverSolution: Only view stats for current server members
DM restrictions
DM restrictions
Error: “In direct messages, you can only view your own voice stats.”Cause: Attempting to view another user’s stats via DMSolution: Use the command in a server to view others’ stats
Guild only command
Guild only command
Error: “This command can only be used in a server.”Cause: Running
/vc leaderboard or /vc settings in DMsSolution: Use these commands in a server channelNo data available
No data available
Info: Leaderboard or stats show empty/minimal dataCause:
- Voice tracking was recently enabled
- No voice activity in the selected time range
- Users haven’t joined voice channels