
How I Built a Discord Activity Heatmap Bot with Python and discord.py
I've been running a Discord server for a while and always wondered: "when is my community actually online?" Discord doesn't show you this. You can see who's online right now, but there's no way to see patterns over time, no weekly view, no hourly breakdown, nothing. So I built Heatmap Bot. What it does Heatmap Bot tracks your server's activity and turns it into a heatmap, a 7×24 grid showing activity by day and hour for the past week. It also supports: Daily bar chart view Monthly trend chart Channel breakdown Member leaderboard Week-over-week comparison Weekly auto-reports Peak activity alerts CSV data export Tech stack Python 3.13 with discord.py 2.x SQLite with aiosqlite for async DB access matplotlib + numpy for heatmap rendering aiohttp for the webhook server Railway for hosting Ko-fi for payments (manual grant flow) The interesting part, rendering heatmaps The heatmap is a 7×24 numpy array. Each cell is the count of events at that day/hour combination, converted from UTC to the s
Continue reading on Dev.to Python
Opens in a new tab



