Daily Dose of Leetcode
✨ Features
- Daily LeetCode Challenge notification
- Deliver random LeetCode problem
- Delivers a random LeetCode problem based on difficulty
- Fetches user
contestprofile information - User-friendly command list
- Displays user streak information
- Provides a user-friendly help command
📒 Commands
The bot does not use the traditional message command approach; instead, it uses a slash commands approach. This means that when you type /
, you will see a list of available commands in the guild. The commands provided by this bot are:
-
;potd
/potd
- Shows the LeetCode Daily Challenge -
;random
- Shows a random LeetCode problem -
/random <easy/medium/hard>
- Shows a random LeetCode problem -
;user <username>
/user <username>
- Shows user Info -
;streak <username>
/streak <username>
- Shows user Streak Info -
;help
/help
- Shows help message -
/topic
- Shows a list of LeetCode topics to choose from
⚙️ Installation
-
📂 Clone the repository:
git clone https://github.com/your-github-username/leetcode-discord-bot.git
-
📂 Navigate to the project directory:
cd DDoL
-
🛠 Install the dependencies:
npm install
-
🔐 Create a
.env
file in the root directory and add your Discord bot token and channel ID:TOKEN=your-discord-bot-token CHANNEL_ID=your-channel-id DEVELOPER_ID=your-discord-id
🚀 Usage
-
Start the bot 🤖:
npm run start
-
Invite the bot to your Discord server using the OAuth2 URL generated from the Discord Developer Portal.
-
Use the commands in any channel the bot has access to.
-
Register slash commands in your guild using
;register guild <your server ID>
. Do not provide the server ID if you want to register commands in your current guild. -
If you want to register slash commands in all guilds, ignore the 4th step and run
;register global