Discord support bot that answers help forum threads using OpenClaw AI, escalates to Telegram when unsure, and builds a knowledge base over time.
- Copy
.env.exampleto.envand fill in all values - Install dependencies:
npm install - Ensure Postgres is running and
DATABASE_URLis set (tables are created automatically on startup) - Start the bot:
npm start
- Monitors threads in the configured help forum channel
- Sends user questions + thread history + knowledge snippets to OpenClaw
/agent - If confidence is high enough, replies directly in-thread
- If confidence is low, contains escalation keywords, or OpenClaw flags escalation — sends to Telegram for manual review
- Aarav replies on Telegram with
A: <answer>(and optionallyKB: <snippet>) — bot posts the answer back to Discord and saves the snippet
Reply to an escalation message with:
A: Your answer here
KB: Optional knowledge snippet to save for future questions
Designed for Railway. The /health endpoint returns OK for health checks.
