Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated readme to include slash commands related changes #44
Updated readme to include slash commands related changes #44
Changes from all commits
18e1926
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Daily Dose of Leetcode
Introduction
This is a Discord bot that integrates with LeetCode to provide daily challenges, random problems, user information, and more. It uses
discord.js
for interacting with the Discord API andleetcode-query
for fetching data from LeetCode.✨ Features
contestprofile information📒 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:
📂 Navigate to the project directory:
cd DDoL
🛠 Install the dependencies:
🔐 Create a
.env
file in the root directory and add your Discord bot token and channel ID:🛠️ How to Set Up a Bot on Discord
Create a new application Go to the Discord Developer Portal and create a new application.
Configure
OAuth2
🔑In your app's settings, navigate to OAuth2.
Go to the
Bot
section and enable the following gateway intents:Server Members Intent
Message Content Intent
TOKEN
🔐 and Create a Discord serverCreate a new server in Discord and retrieve the
Channel ID
where your bot will operate.🚀 Usage
Start the bot 🤖:
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
✨ Contributing
Contributions are welcome! Please raise an issue with your changes.
🤝 How to Contribute
We appreciate your contributions! To get involved, follow these simple steps:
Fork the repository 🍴
Make a personal copy of the repository.
Create a new branch 🌿
Start working on your changes in a separate branch for better tracking.
Make your changes 🛠️
Update the code, fix bugs, or add new features!
Commit and push your changes 💻
Make sure to include a clear commit message explaining what you’ve done.
Submit a Pull Request (PR) 🪄
Once you're ready, open a PR for review.
Done! ✅ That's it—thanks for contributing! We’ll review your PR as soon as possible.
❤️ Our Valuable Contributors
🪄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Don't forget to give us a ⭐