The Discord Leetcode bot queries the LeetCode GraphQL API to fetch and return the latest daily challenge directly into your Discord server. This bot is designed to help users stay consistent with their coding practice by providing them with the daily problem from LeetCode.
- Node.js (v14.x or higher)
- A Discord bot token (create one from the Discord Developer Portal)
- LeetCode account (for accessing the daily challenges)
- Clone the repository
git clone [email protected]:HunterHester/Discord-LeetCode-Bot.git
- Install dependencies
npm install
- Setup environmental variables in a config.json file with the following (You will find these in the Discord Developer Portal):
"token": "TOKEN HERE",
"guildId": "GUILDID HERE",
"clientId": "CLIENTID HERE"
- Run bot
node index.js
The bot will post the daily challenge in whatever channel you specify automatically at Midnight UTC. You're also able to run the following commands:
/daily
Returns the daily challenge/enroll
enrolls user into notifications/unenroll
unenrolls user from notifications
I'd like to eventually add tracking for user's that are enrolled into the bots notifications so that they'll receive reminders if they haven't completed the daily and the daily is about to reset.
I'd also like to make it so it will remind you when a new contest is about to happen and give you notifications regarding that as well.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries, please reach out to [email protected].