Luna Monitor is a stealth-mode analytics bot framework for Telegram and Discord. It ingests group/channel messages, scores them using custom signal logic, and logs high-signal content for downstream processing or summary dispatch.
- Telegram + Discord bot observers (passive/stealth mode by default)
- Keyword and emoji scoring using
signal_score.py - Rotating Bloom filter to prevent duplicate ingestion
- FastAPI service with webhook endpoint
- SQLite logging for all ingested messages
- Deploy-ready in GitHub Codespaces or Docker
One command autonomous run
python init_launchpad.pyTELEGRAM_TOKEN=your_telegram_token
DISCORD_TOKEN=your_discord_token
WEBHOOK_URL=http://localhost:8000/webhookpython init_launchpad.pyThis will:
- Launch the FastAPI service on port 8000
- Start Telegram and Discord observers
- Enable webhook summary dispatch
GET /ping→{ "status": "pong" }GET /status→{ "service": "running" }POST /webhook→ Accepts summary JSON payloads
sqlite3 log_matrix.db
SELECT * FROM logs ORDER BY id DESC LIMIT 5;- Go to @BotFather
- Create your bot:
/newbot - Copy the token into
.env - Add the bot to a public group
- (Optional) Disable Privacy Mode:
/mybots→ Bot → Group Privacy → Turn off
- Go to Discord Developer Portal
- Select your app → OAuth2 → URL Generator
- Scopes:
bot - Permissions:
Read Messages/View ChannelsSend MessagesRead Message HistoryMessage Content
- Copy the generated URL and open it in browser to invite bot to server
The message scoring system works by evaluating content against weighted keywords, emojis, and phrases:
SCORING_RULES = {
"words": { "alpha": 1, "drop": 1, ... },
"emojis": { "🚀": 1.5, "🔥": 1.2, ... },
"phrases": { "airdrop incoming": 2, ... }
}To prevent re-ingesting the same messages:
- Each observer uses a rotating Bloom filter
- It resets every 5 minutes
- If a message ID is already seen, it is skipped
This project includes:
.devcontainer/devcontainer.json.devcontainer/Dockerfile
Open it in GitHub Codespaces and it auto-runs:
- Environment setup
- Server launch
- Observer startup
---# bottest