- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| dailystats | ||
| .gitignore | ||
| info.json | ||
| LICENSE | ||
| README.md | ||
DailyStats
A Red-DiscordBot cog for automatic Discord server activity reports.
Features
- Daily report at a configurable local time
- Optional automatic Sunday weekly report
- Message counts per member
- Active member count
- Voice time per member
- Voice time per channel
- Named Discord activities/games and their observed duration
- Top members by messages and voice time
- Day-over-day comparison
- Europe/Berlin timezone by default
- SQLite persistence
- Sessions are split at local midnight
- Active sessions are flushed before reports and restored after a bot restart
- Configurable data retention (7–730 days)
- No message content is stored
- Per-guild configuration and data isolation
- Manual daily and weekly reports
Requirements
- Red-DiscordBot 3.5.24 or newer
- Python 3.10+
- Discord Gateway intents that allow message and presence events as applicable to your bot configuration
Red 3.5.24 is the current stable release targeted by this cog.
Installation
Add this repository using Red's Downloader:
[p]repo add <YOUR_FORGEJO_REPOSITORY_URL>
[p]cog install <YOUR_REPO_NAME> dailystats
[p]load dailystats
Replace the placeholders with your actual Forgejo repository URL and repository name.
Initial setup
Set a channel:
[p]dailystats set channel #server-statistiken
Set the report time:
[p]dailystats set time 23:59
Optional timezone:
[p]dailystats set timezone Europe/Berlin
Check settings:
[p]dailystats settings
Generate a report manually:
[p]dailystats report
[p]dailystats weekly
Commands
dailystats
Shows the command help.
dailystats report
Generate today's report immediately.
dailystats weekly
Generate the current seven-day report immediately.
dailystats settings
Show the current configuration.
dailystats set channel <channel>
Set the automatic report channel.
dailystats set time <HH:MM>
Set the automatic daily report time.
dailystats set timezone <IANA timezone>
Set the timezone used for reports and day boundaries.
dailystats set retention <days>
Set detailed-statistics retention between 7 and 730 days.
dailystats set weekly <true|false>
Enable or disable the automatic Sunday report.
dailystats set enabled <true|false>
Enable or disable collection for the server.
dailystats reset bestätigen
Delete all stored statistics for the current server.
Discord activity tracking
Discord activity data is presence information supplied to the bot. The cog records the names of activities that Discord reports, but it cannot know about activity that Discord does not expose to the bot. Activity duration is therefore an observed duration, not a guarantee of actual play time.
If a user has multiple named activities at once, the observed interval is divided equally between them so that total tracked activity time is not double-counted.
Privacy and storage
The cog stores aggregate statistics, not message text. Stored identifiers are Discord user IDs, guild IDs and voice channel IDs. Activity names are stored because they are needed to produce the game/activity report.
The default retention is 90 days. Server administrators can reduce it and can delete all server statistics immediately.
Repository structure
DailyStats/
├── info.json
├── README.md
└── dailystats/
├── __init__.py
├── dailystats.py
└── info.json
License
MIT License. See LICENSE.