The Discord Intelligence Bot is a centralized, observability‑first Discord bot designed to monitor and collect structured intelligence signals across multiple Discord servers and report them into a single, controlled Discord server (the Central Guild).
This is not a conversational bot. It is infrastructure.
The bot focuses on telemetry, logging, and lifecycle events, providing a clean foundation for future analytics, reporting, and automation layers.
- Join multiple Discord servers (invited or via normal join links where permitted)
- Observe key server and member lifecycle events
- Centralize all reporting into one Discord server
- Keep logs persistent, auditable, and organized
- Remain lightweight, compliant, and extensible
- Connects to Discord using
discord.py - Validates runtime configuration on startup
- Logs bot startup and health
- Logs when the bot joins new servers
- Logs when non‑bot users join servers
- Sends all intelligence data to a dedicated Central Guild
All output is sent to a single Discord server split into two channels:
-
System Logs Channel
- Bot startup events
- Server join events
- System‑level messages
-
Joins Feed Channel
- Member join events
- Server context
- Timestamps
No direct messages are used. All data remains persistent and reviewable.
bot/
├── main.py # Bot initialization, validation, event wiring
├── config.py # Environment‑based configuration
├── events.py # Discord event handling & reporting
├── logger.py # Centralized logging setup
├── utils.py # Helper utilities (timestamps, etc.)
.env # Secrets & IDs (not committed)
- Initializes the Discord bot
- Configures required intents
- Validates Central Guild and channels
- Delegates all event logic to handlers
- Starts the bot process
No business logic lives here.
- Handles Discord lifecycle events
- Formats structured intelligence messages
- Routes messages to correct reporting channels
Implemented events:
on_readyon_guild_joinon_member_join
Loads configuration strictly from environment variables:
DISCORD_TOKENCENTRAL_GUILD_IDJOINS_CHANNEL_IDSYSTEM_LOGS_CHANNEL_ID
This keeps the project deployment‑safe and CI/CD friendly.
- Provides unified logging
- Timestamped output
- Works in local and hosted (Render) environments
Create a .env file with the following values:
DISCORD_TOKEN=your_bot_token
CENTRAL_GUILD_ID=1234567890
JOINS_CHANNEL_ID=1234567890
SYSTEM_LOGS_CHANNEL_ID=1234567890Never commit .env to version control.
- Intelligence‑first: No commands or chat logic yet
- Centralized visibility: One source of truth for logs
- Fail loudly: Misconfiguration is surfaced immediately
- Lenient compliance: Supports different server join methods
- Extensible: Designed to layer OAuth2, APIs, and analytics later
These are planned extensions, not missing features:
- OAuth2 authorization flows
- REST / webhook API layer
aiohttpserver- Database persistence
- Per‑server aggregation
- Commands or UI interactions
The current phase focuses strictly on a solid, correct foundation.
The bot is designed to deploy cleanly on platforms like Render.
Typical flow:
- Push code to GitHub
- Set environment variables in Render dashboard
- Deploy as a background worker
- Bot connects and begins reporting automatically
- Bot connects reliably
- Central Guild receives all intelligence
- System and join events are logged cleanly
- Architecture is modular and scalable
- Ready for OAuth2, APIs, and analytics layers
- OAuth2 authorization & server discovery
- REST / ingestion endpoints
- Persistence and historical analysis
- Aggregation and advanced intelligence
This project is built as Discord infrastructure, not a toy bot.
The foundation prioritizes correctness, clarity, and observability — ensuring future features can be added without refactoring or architectural debt.