A Discord bot that tracks LeetCode progress, celebrates problem-solving wins, and fosters friendly competition within your Discord community.
✨ Track LeetCode Profiles — Link your LeetCode account to your Discord profile
🏆 Daily Leaderboards — Compete with friends; see who solved the most problems yesterday
🔥 Victory Announcements — Get notified when server members solve new problems
⏰ Streak Nudges — 8 PM daily reminder if your active streak is at risk
📊 Stats & Profiles — View detailed LeetCode stats, difficulty breakdowns, and current streaks
🎯 Daily Problems — Get the LeetCode problem of the day with difficulty and category
Watch a quick demo of Mammon in action:
Or manually:
-
Invite the bot:
- Visit the Discord Developer Portal
- Copy the OAuth2 invite URL or ask the bot owner for a direct invite link
- Select your server and authorize
-
Set up the log channel:
/setchannel #leetcode-feedThis is where victory announcements, daily recaps, and streak nudges will be posted.
-
Link your LeetCode account:
/link [your_leetcode_username] -
You're ready! The bot will start tracking your submissions.
| Command | Description |
|---|---|
/link <username> |
Link your LeetCode account to your Discord profile |
/stats |
View your LeetCode stats (total solved, streak, difficulty breakdown) |
/leaderboard |
See who in the server has solved the most problems |
/daily |
Get today's LeetCode problem of the day |
/untrack |
Remove your account from tracking |
/list |
List all linked LeetCode accounts in the server |
/setchannel <channel> |
Set the channel for bot announcements (admin only) |
/mammon-help |
View all available commands |
When you solve a new LeetCode problem, the bot announces it in the log channel with:
- Your LeetCode profile picture
- Problem name and difficulty
- Your total solve count
- Programming language used
A leaderboard of the top problem-solvers from yesterday, with medal rankings.
If you have an active streak and haven't solved a problem yet today, you'll get a nudge to keep it alive.
The bot stores the following information in a local SQLite database:
- Discord ID — Your Discord snowflake ID (permanent identifier)
- LeetCode Username — Your LeetCode profile username (entered by you)
- Guild ID — The Discord server you're in
- Solved Problems — Metadata about problems you've solved (title, slug, timestamp, difficulty)
- Stats Cache — Your total problems solved, current streak (cached from LeetCode)
❌ Your Discord display name or avatar
❌ Your LeetCode password or authentication tokens
❌ Your email address
❌ Personal information beyond username
❌ Problem submissions or code
- LeetCode Data: Retrieved via the official LeetCode GraphQL API (public, no authentication required)
- Discord Data: Limited to interaction metadata (user ID, guild ID)
To remove your data from the bot:
/untrack
This removes your linked account and stops all tracking. Historical solved problems remain in the database.
- LeetCode API — We query public LeetCode data. See LeetCode's Privacy Policy
- Railway — The bot is hosted on Railway. See Railway's Privacy Policy
If you're concerned about data privacy, you can self-host this bot:
- Fork the repository
- Deploy to your own server (Railway, Oracle Cloud, etc.)
- Your data stays under your control
- See DOCUMENTATION_README.md for setup instructions
This bot is provided as-is. By using it:
- You acknowledge that solution submission data is cached and may persist in backups
- You consent to your LeetCode username and solved problem metadata being stored locally
- The bot owner is not liable for data loss or misuse
- For questions about data retention, email dannguyen2412005@gmail.com
-
Clone the repository:
git clone https://github.com/dannguyen24/mammon.git cd mammon -
Install dependencies:
npm install
-
Create
config.json(or use environment variables):{ "token": "YOUR_BOT_TOKEN", "clientId": "YOUR_CLIENT_ID" } -
Register commands:
node deploy-commands.js
-
Start the bot:
node index.js
- Commands — Modular slash command handlers in
commands/ - Services — Background polling, scheduling, and API integrations in
services/ - Database — SQLite schema and query layer in
database/ - Docs — Full technical documentation in
docs/
See DOCUMENTATION_README.md for detailed technical information.
The bot is deployed to Railway with automatic redeployment on git push. See docs/2-project-architecture.md for deployment details.
- Found a bug? Open an issue on GitHub
- Have a feature request? Let me know!
- Want to contribute? Fork and submit a pull request
This project is open source. Feel free to fork, modify, and self-host your own version.
Made with ❤️ for competitive coders everywhere.