Skip to content

HunterHester/Discord-LeetCode-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord LeetCode Bot

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 Badge Discord Badge GraphQL Badge JavaScript Badge LeetCode Badge Linux Badge

Requirements

  • Node.js (v14.x or higher)
  • A Discord bot token (create one from the Discord Developer Portal)
  • LeetCode account (for accessing the daily challenges)

Installation

  1. Clone the repository git clone [email protected]:HunterHester/Discord-LeetCode-Bot.git
  2. Install dependencies npm install
  3. 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"
  1. Run bot node index.js

Usage

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

Future Implementations

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.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any inquiries, please reach out to [email protected].

Releases

No releases published

Packages

No packages published