A Discord bot for LeetCode practice. Get daily challenges, random problems, and view user profiles.
| Command | Description |
|---|---|
/daily |
Get today's LeetCode daily coding challenge |
/problem [difficulty] |
Get a random LeetCode problem (optionally filter by Easy/Medium/Hard) |
/solution <id> <language> |
Get the solution for a specific LeetCode problem in the specified language |
/profile <username> |
View a LeetCode user's profile, stats, and social links |
- Node.js
- A Discord bot token (Discord Developer Portal)
git clone https://github.com/Bahaaio/leet-bot.git
cd leet-bot
npm installCreate a .env file in the root directory:
TOKEN="YOUR_BOT_TOKEN"
CLIENT_ID="YOUR_CLIENT_ID"| Field | Description |
|---|---|
token |
Your Discord bot token |
clientId |
Your Discord application ID |
Register slash commands with Discord:
npm run deploynpm start| Script | Description |
|---|---|
npm start |
Start the bot |
npm run deploy |
Register slash commands with Discord |
npm run delete |
Remove slash commands from Discord |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
MIT