8000 ✨ Discord Get Channel Acitivy Lens by sojinmm · Pull Request #248 · Spectral-Finance/lux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

✨ Discord Get Channel Acitivy Lens #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sojinmm
Copy link
Contributor
@sojinmm sojinmm commented Apr 7, 2025

feat(discord): Add channel activity analytics lens

Implements a new Discord lens for retrieving and analyzing channel activity metrics. This lens provides valuable insights into channel usage patterns and engagement metrics, helping server administrators better understand their community's activity.

Key Features:

  • Message count tracking: Total number of messages in the specified time range
  • Active user analysis: Count of unique users participating in discussions
  • Peak activity detection: Identifies the most active hour based on message frequency
  • Message type categorization: Breaks down messages into text, image, and link types
  • Activity timeline: Hour-by-hour message distribution for trend analysis

Technical Implementation:

  • Follows established Discord lens patterns for consistency and maintainability
  • Uses Discord's messages endpoint with efficient pagination (max 100 messages)
  • Supports configurable time ranges (24h, 7d, 30d) for flexible analysis
  • Implements robust error handling for API failures and invalid inputs
  • Includes comprehensive test coverage with UnitAPICase

Example Usage:

GetChannelActivity.focus(%{
  channel_id: "123456789012345678",
  time_range: "24h",
  limit: 100
}, %{})

This lens is part of our ongoing effort to provide better analytics and insights for Discord server management. It maintains our codebase's standards for error handling, parameter validation, and test coverage while adding valuable functionality for understanding channel dynamics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0