The community
I'm a longtime member of a 3,500-person Discord for a niche online game. Live in-game events happen all day, both scheduled and spontaneous, and people routinely miss them — either because they didn't see the announcement or because the announcement didn't exist. Three bots emerged out of trying to fix that.
Bot 1: activity-triggered alerts
This one polls the game's /api/gethits endpoint and watches for activity spikes. The rule is simple: if more than 12 in-game hits land within a 5-minute window, ping the channel — "snowball fight is happening NOW, get online." A 30-minute cooldown keeps it from spamming when activity stays high, and alert state persists in a JSON file so restarts don't reset the cooldown.
The hardest part wasn't the polling — it was tuning the threshold. Too low and the bot screams during normal play. Too high and it misses the actual rallies. Twelve hits in five minutes ended up being the sweet spot for our scale. Rates that work for one community will be totally wrong for another.
Bot 2: X/Twitter content forwarder
The game's official X account posts surprise event announcements (server back up, double rewards, etc.) that don't always make it to the Discord in time. So I built a small scraper that watches the account and forwards new posts directly into the community channel.
The Twitter API pricing made the official route a non-starter for a community project. Scraping the public profile is more fragile, but for low-volume monitoring of a single account, it's been reliable enough. I rate-limit aggressively and back off on errors. The bot has run for months without intervention.
Bot 3: full-stack soundboard + music bot
This one's for a smaller friends' server, not the public community. It's the largest of the three at roughly 1,300 lines of Python.
- Slash commands for voice control:
/play,/skip,/queue,/volume - YouTube and Spotify support via yt-dlp, with FFmpeg handling the audio pipeline
- A web UI for the soundboard, served by Flask and tunneled out via ngrok — so anyone on the call can drop a sound effect from their phone without typing a command
Stack: discord.py + Flask + yt-dlp + FFmpeg + ngrok.
What's hard about Discord bots
- Voice connections are flaky. Reconnect logic is a meaningful chunk of the music bot's code — users don't care that the underlying issue is upstream, they just see "the bot disappeared mid-song."
- Slash command rate limits are tighter than text channels. Design for that early or you'll hit the wall during the first big session.
- Hosting matters. The alert bot lives on a small VPS where uptime is the priority. The music bot runs locally during sessions because YouTube traffic from a cloud IP gets throttled fast.
Why this is the most rewarding work
None of these bots are technically novel. But every one of them gets used multiple times per day by real people, and that completely changes how you build them. You stop optimizing for clever code and start optimizing for not-breaking-on-Saturday-nights. Bug reports come in within minutes of regressions. The feedback loop is brutal and excellent.