{"id":24549306,"url":"https://github.com/mohyware/streak-punisher-bot","last_synced_at":"2025-08-20T15:07:31.947Z","repository":{"id":273451051,"uuid":"919159499","full_name":"mohyware/streak-punisher-bot","owner":"mohyware","description":"A Discord bot that keeps users on track with their daily problem-solving streaks.","archived":false,"fork":false,"pushed_at":"2025-05-14T10:01:45.000Z","size":1028,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T10:53:19.728Z","etag":null,"topics":["discord-bot","discord-js","nodejs","problem-solving","streak"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mohyware.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-01-19T21:05:04.000Z","updated_at":"2025-05-14T10:03:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"db7d1656-7c26-4760-9c4a-2f1286d7d426","html_url":"https://github.com/mohyware/streak-punisher-bot","commit_stats":null,"previous_names":["mohyware/streak-punisher-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohyware/streak-punisher-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohyware%2Fstreak-punisher-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohyware%2Fstreak-punisher-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohyware%2Fstreak-punisher-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohyware%2Fstreak-punisher-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohyware","download_url":"https://codeload.github.com/mohyware/streak-punisher-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohyware%2Fstreak-punisher-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260097485,"owners_count":22958210,"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","discord-js","nodejs","problem-solving","streak"],"created_at":"2025-01-23T00:15:08.007Z","updated_at":"2025-06-16T04:40:22.500Z","avatar_url":"https://github.com/mohyware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Streak Punisher Bot\n### Overview\nStreak Punisher is a Discord bot designed to help users maintain their problem-solving streaks. Each day It automatically fetches challenges from LeetCode and Codeforces, insult those who abandon their streak, ranks users based on streak, solved problems, then greet the top performer.\n\n---\n\n### Features\n- 🤖 **Automated Problem Fetching:** The bot automatically fetches problems from LeetCode and Codeforces.\n- ✍️ **Manual Problem Addition:** For platforms not directly supported, Streak Punisher allows you to manually add problems.\n- 📈 **Progress Tracking:** With MongoDB for data persistence, Streak Punisher keeps a detailed record of your solved problems, streaks, and overall progress, helping you visualize your growth over time.\n- ⏰ **Daily Reminders:** Sends a message two hours before deadline to remind users who haven't solved a problem yet.\n\n---\n\n### Prerequisites\n\nEnsure you have the following:\n\n- **Node.js** (v16 or later recommended)\n- **MongoDB** instance (local or cloud-hosted)\n- **Discord Bot Token** (obtained from the [Discord Developer Portal](https://discord.com/developers/applications))\n\n---\n\n### Installation\n\n1. Clone the repository:  \n   ```bash\n   git clone https://github.com/mohyware/streak-punisher-bot.git\n   cd streak-punisher-bot\n2. Install dependencies:\n    ```bash\n    npm install\n    ```\n3. Rename .env.example to .env and add your configurations:\n    ```bash\n    # DB\n    MONGO_URI=mongodb+srv://name:password@cluster0.mongodb.net/databasename\n    # Server Port (8000 Koyeb deployment health check)\n    PORT=8000\n    # Platforms\n    CODEFORCES_KEY=your-codeforces-key\n    CODEFORCES_SECRET=your-codeforces-secret\n    LEETCODE_COOKIE='csrftoken=your-leetcode-cookie'\n    # Discord\n    DISCORD_TOKEN=your-bot-token\n    OWNER_ID=your-discord-id # for admin commands\n    ALLOWED_CHANNEL_ID_1=\n    ALLOWED_CHANNEL_ID_2=\n    ALLOWED_CHANNEL_ID_3=\n    # Customize msgs\n    FAIL_MSG=\n    TOP_MSG=\n    ```\n4. Use one of the following commands to start the bot:\n    ```bash\n    npm run dev\n    ```\n    ```bash\n    npm run start\n    ```\n---\n\n### Usage\n1. Invite the bot to your Discord server using the OAuth2 URL.\n\n2. Use the commands listed above to interact with the bot.\n---\n### Bot Commands\n#### User Commands:\n\n- `!join \u003cusername\u003e \u003cleetcode_username (optional)\u003e \u003ccodeforces_username (optional)\u003e`  \n  Adds a new user to the system.\n\n- `!getuser \u003cname|codeforces_username|leetcode_username\u003e`  \n  Retrieves the details of the specified user.\n\n- `rename \u003cname\u003e \u003cnew_leetcode_username\u003e \u003cnew_codeforces_username\u003e`  \n  Updates the leetcode or codeforces username of an existing user.\n\n- `!escape \u003cusername\u003e`  \n  Removes the specified user from the system.\n\n  **Example:**  \n  `!join mohy null mohyware`  \n  Adds a user with only a Codeforces username.\n\n#### Problem Commands:\n\n- `!addproblem \u003cproblemId\u003e \u003ctitle\u003e \u003cplatform\u003e \u003csubmissionId (optional)\u003e`  \n  For problems that are not on Codeforces or LeetCode, add them manually.\n\n- `!addproblems \u003cplatform\u003e`  \n  `\u003cproblem title\u003e`\n\n  `\u003cproblem title\u003e`\n\n  `\u003cproblem title\u003e`\n\n  add more than one quickly.\n\n- `!deleteproblem \u003cproblemID\u003e`  \n  Deletes the specified problem from the system.\n\n#### Statistics Commands **(Admin Only)**:\n\n- `!dailystreak`  \n  Retrieves the daily streak statistics for all users. **this ran automatically 12 PM  (Cairo time)**.\n\n- `!updatestreak`  \n  Updates the daily streak for all users. **this ran automatically 12 PM  (Cairo time)**.\n\n- `!reminder`  \n  remind users two hours before the deadline. **this ran automatically 10 PM  (Cairo time)**.\n\n- `!setstreak \u003c@username\u003e \u003cdays\u003e`  \n  Manually sets the daily streak for a specific user.\n\n---\n### Contributing\nFeel free to fork the repository and submit pull requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohyware%2Fstreak-punisher-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohyware%2Fstreak-punisher-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohyware%2Fstreak-punisher-bot/lists"}