{"id":28386632,"url":"https://github.com/saifadin1/leetbot","last_synced_at":"2025-10-31T12:02:24.320Z","repository":{"id":292593957,"uuid":"981115085","full_name":"saifadin1/LeetBot","owner":"saifadin1","description":"Discord bot for leetcode","archived":false,"fork":false,"pushed_at":"2025-05-15T07:19:17.000Z","size":72,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T19:18:36.312Z","etag":null,"topics":["discord-bot","leetcode"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saifadin1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-05-10T11:25:58.000Z","updated_at":"2025-05-15T07:19:21.000Z","dependencies_parsed_at":"2025-05-11T00:26:11.973Z","dependency_job_id":"c0d5cc29-ba45-4066-851e-9b2010767d9f","html_url":"https://github.com/saifadin1/LeetBot","commit_stats":null,"previous_names":["saifadin1/leetbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saifadin1/LeetBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saifadin1%2FLeetBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saifadin1%2FLeetBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saifadin1%2FLeetBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saifadin1%2FLeetBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saifadin1","download_url":"https://codeload.github.com/saifadin1/LeetBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saifadin1%2FLeetBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094304,"owners_count":23257930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["discord-bot","leetcode"],"created_at":"2025-05-30T15:14:21.681Z","updated_at":"2025-10-31T12:02:24.314Z","avatar_url":"https://github.com/saifadin1.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetBot\n\nLeetBot is a discord bot designed to gamify leetcode problem solving and help users improve their problem solving skills and share knowledge with others in interactive way.\nyou can try it out on the [LeetBot Discord Server](https://discord.gg/pVQehWMjC2).\n---\n\n## 🚀 Features\n\n* **User Identification**: Verify and link your Discord account with LeetCode.\n* **Challenges**: Start, join, and finish coding challenges directly in Discord.\n* **Team Challenges**: Create and manage team-based coding competitions.\n* **Leaderboards**: Track and display challenge results.\n* **Help Command**: Get a list of available commands and usage.\n\n---\n\n## 🛠️ Tech Stack\n\n* **.NET 9 / C#**\n* **Entity Framework Core** (with PostgreSQL)\n* **Discord.Net**\n\n---\n\n## 📂 Project Structure\n\n* `Commands/` → Slash \u0026 text commands (`IdentifyCommand`, `ChallengeCommand`, etc.)\n* `ComponentHandlers/` → Button \u0026 interaction handlers (e.g., join/leave team buttons).\n* `Data/` → Database context (`AppDbContext`).\n* `Repositories/` → Repository layer for DB access.\n* `Services/` → Domain services (`LeetCodeService`, `TeamService`).\n* `BotHostedService.cs` → Background service that manages bot lifecycle.\n* `Program.cs` → Main entry point with DI and configuration setup.\n\n---\n\n## ⚙️ Configuration\n\nLeetBot requires an `appsettings.json` file to run. Example:\n\n```json\n{\n  \"ConnectionStrings\": {\n    \"DefaultConnection\": \"Host=localhost;Port=5432;Database=leetbot;Username=postgres;Password=yourpassword\"\n  },\n  \"Discord\": {\n    \"BotToken\": \"YOUR_DISCORD_BOT_TOKEN\"\n  }\n}\n```\n\n* **DefaultConnection** → PostgreSQL connection string.\n* **BotToken** → Your Discord bot token (from the [Discord Developer Portal](https://discord.com/developers/applications)).\n\n---\n\n## 🏗️ Setup \u0026 Run\n\n### 1️⃣ Clone Repository\n\n```bash\ngit clone https://github.com/your-username/LeetBot.git\ncd LeetBot\n```\n\n### 2️⃣ Install Dependencies\n\n```bash\ndotnet restore\n```\n\n### 3️⃣ Database Migration\n\n```bash\ndotnet ef database update\n```\n\n### 4️⃣ Run the Bot\n\n```bash\ndotnet run\n```\n\nThe bot will automatically connect to Discord using the provided token.\n\n---\n\n## 🤝 Contributing\n\n1. Fork the repo.\n2. Create a feature branch (`git checkout -b feature/new-command`).\n3. Commit changes (`git commit -m \"feat: add new command\"`).\n4. Push branch (`git push origin feature/new-command`).\n5. Open a Pull Request.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaifadin1%2Fleetbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaifadin1%2Fleetbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaifadin1%2Fleetbot/lists"}