{"id":37227683,"url":"https://github.com/forcetrainer/discord-analyzer","last_synced_at":"2026-01-15T03:23:25.180Z","repository":{"id":331680069,"uuid":"1131812209","full_name":"forcetrainer/discord-analyzer","owner":"forcetrainer","description":"Export Discord messages and analyze them for FAQs using semantic clustering","archived":false,"fork":false,"pushed_at":"2026-01-10T23:20:14.000Z","size":434,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T05:33:20.090Z","etag":null,"topics":["clustering","discord","discord-bot","faq","fastapi","nlp","python","react","semantic-search"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forcetrainer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T18:36:06.000Z","updated_at":"2026-01-10T23:15:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/forcetrainer/discord-analyzer","commit_stats":null,"previous_names":["forcetrainer/discord-analyzer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/forcetrainer/discord-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forcetrainer%2Fdiscord-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forcetrainer%2Fdiscord-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forcetrainer%2Fdiscord-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forcetrainer%2Fdiscord-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forcetrainer","download_url":"https://codeload.github.com/forcetrainer/discord-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forcetrainer%2Fdiscord-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering","discord","discord-bot","faq","fastapi","nlp","python","react","semantic-search"],"created_at":"2026-01-15T03:23:24.679Z","updated_at":"2026-01-15T03:23:25.166Z","avatar_url":"https://github.com/forcetrainer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Chat Analyzer\n\n[![License](https://img.shields.io/badge/license-PolyForm%20Noncommercial-blue)](./LICENSE)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![React](https://img.shields.io/badge/react-18-blue.svg)](https://reactjs.org/)\n\nA web-based tool to export Discord messages and analyze them for frequently asked questions. Helps identify common questions in your community and the responses they receive, so you can build better documentation.\n\n\u003e **Warning**\n\u003e\n\u003e This tool is designed for **personal use on servers you control**. Whoever holds the bot token has access to read messages from **all servers** the bot has been added to. Do not share your bot's invite link publicly or offer this as a service to others. If someone adds your bot to their server, you will be able to export their messages. Only use this tool on your own communities.\n\n## Features\n\n- Export messages from any Discord channel your bot has access to\n- Automatic question detection using pattern matching\n- Semantic clustering of similar questions using sentence embeddings\n- Response extraction to show how questions were answered\n- Web UI for managing exports and viewing results\n\n![Discord Analyzer Results](./docs/screenshots/results.png)\n*Clustered FAQ questions with community responses*\n\n## Prerequisites\n\n- Python 3.11+\n- Node.js 18+\n- A Discord bot token\n\n## Setup\n\n### 1. Create a Discord Bot\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)\n2. Click \"New Application\" and give it a name\n3. Go to the \"Bot\" section and click \"Add Bot\"\n4. Enable these Privileged Gateway Intents:\n   - **Message Content Intent** (required to read message text)\n5. Copy the bot token (you'll need this later)\n6. Go to \"OAuth2\" \u003e \"URL Generator\":\n   - Under Scopes: select `bot`\n   - Under Bot Permissions: select `View Channels` (General) and `Read Message History` (Text)\n7. Use the generated URL to invite the bot to your server\n\n### 2. Backend Setup\n\n```bash\ncd backend\n\n# Create virtual environment\npython3 -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Start the server\npython3 run.py\n```\n\nThe backend will start on http://localhost:8000\n\n**Note:** The first time you run an analysis, it will download the sentence-transformers model (~90MB). This only happens once.\n\n### 3. Frontend Setup\n\n```bash\ncd frontend\n\n# Install dependencies\nnpm install\n\n# Start the dev server\nnpm run dev\n```\n\nThe frontend will start on http://localhost:5173\n\n## Usage\n\n### 1. Setup\nEnter your Discord bot token on the Setup page.\n\n![Setup page](./docs/screenshots/setup.png)\n\n### 2. Export\nSelect a server and channels, then start exporting messages.\n\n![Export page](./docs/screenshots/export.png)\n\n### 3. Analysis\nOnce export completes, run semantic analysis to find FAQ clusters.\n\n![Analysis page](./docs/screenshots/analysis.png)\n\n### 4. Results\nView grouped questions and their community responses.\n\n![Results page](./docs/screenshots/results.png)\n\n## Analysis Parameters\n\n- **Min Cluster Size**: Minimum number of similar questions needed to form a cluster (default: 5)\n- **Min Samples**: Core samples required for HDBSCAN clustering (default: 3)\n\nLower values = more clusters with fewer questions each. Higher values = fewer, larger clusters.\n\n## Architecture\n\nSee [ARCHITECTURE.md](./ARCHITECTURE.md) for detailed technical documentation.\n\n## Tech Stack\n\n**Backend:**\n- FastAPI (async Python web framework)\n- discord.py (Discord API wrapper)\n- sentence-transformers (semantic embeddings)\n- HDBSCAN (density-based clustering)\n- SQLite (local database)\n\n**Frontend:**\n- React + TypeScript\n- Vite (build tool)\n- TanStack Query (data fetching)\n- Tailwind CSS (styling)\n\n## Development\n\n### Demo Mode\n\nTo explore the UI without a Discord bot:\n\n```bash\ncd backend\npython3 seed_demo_data.py\nDISCORD_ANALYZER_DEMO_MODE=true python3 run.py\n```\n\nThis seeds the database with sample data and mocks the Discord connection.\n\n## License\n\nThis project is licensed under the [PolyForm Noncommercial License 1.0.0](./LICENSE). You are free to use, modify, and share this software for noncommercial purposes with attribution. Commercial use is not permitted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforcetrainer%2Fdiscord-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforcetrainer%2Fdiscord-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforcetrainer%2Fdiscord-analyzer/lists"}