Skip to content
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

Improved LeetCode Discord Bot with User Comparison and Express.js Conversion #5

Closed
wants to merge 4 commits into from

Conversation

ag21o9
Copy link

@ag21o9 ag21o9 commented Oct 2, 2024

fixes issue #1
fixes issue #3

This PR addresses issue #1 and issue #3 by introducing a new user comparison feature and migrating the LeetCode Discord bot code to Express.js.

New Feature: User Comparison

A new command, ;compare, allows users to compare two LeetCode profiles by entering usernames as arguments (e.g., ;compare username1 username2).
The bot retrieves and displays contest data for both users, including:
Contests Attended
Rating
Top Percentage
Badge (if applicable)
This feature fosters healthy competition and analysis among users.

Express.js Conversion

The codebase has been successfully migrated from its original form to Express.js, providing a more efficient and structured framework.
This conversion offers several benefits:
Improved code organization and maintainability through separation of concerns.
Enhanced scalability for potential future features.
Adherence to a widely used and popular Node.js framework.
Existing Commands

The bot continues to support the following commands:

;potd: Shows the daily LeetCode challenge.
;random: Displays a random LeetCode problem.
;user : Retrieves and displays user information (contest data, streak, etc.).
;streak : Shows the current LeetCode streak for a user.
;help: Provides a list of available commands and their functionalities.

Screenshot 2024-10-02 113455

@ag21o9
Copy link
Author

ag21o9 commented Oct 2, 2024

Please checkout and let me know about the other changes

@jinx-vi-0
Copy link
Owner

I've my exam tomorrow. I'll start reviewing PR from 4th October.

@ag21o9
Copy link
Author

ag21o9 commented Oct 2, 2024

sure , all the best for it

@ag21o9
Copy link
Author

ag21o9 commented Oct 5, 2024

Can you review it now

@jinx-vi-0
Copy link
Owner

@ag21o9 pr has some merge conflicts. please fix it.

@BhairabMahanta
Copy link
Contributor

Hey, the new merge now allows a systematic command handling!
you might be needing to change a little bit of your code. It's nothing much, just rather go to the commands folder and inside it, choose leetcode folder, create a new .mjs file and import what dependencies you require and follow this format to

export default {
name: "potd",
description: "Shows the LeetCode Daily Challenge",
aliases: ["lcd", "daily"], // Add aliases here
async execute(client, message, args) {
}

make commands work.

@ag21o9
Copy link
Author

ag21o9 commented Oct 6, 2024

I will resolve the merge conflicts

@ag21o9
Copy link
Author

ag21o9 commented Oct 6, 2024

I have solved the merge conflicts
you can have a check and merge

@ag21o9
Copy link
Author

ag21o9 commented Oct 6, 2024

Can you review it now

@jinx-vi-0
Copy link
Owner

@ag21o9 pr still has some merge conflicts. please fix it.

@ag21o9
Copy link
Author

ag21o9 commented Oct 8, 2024

Check Out now please

@ag21o9
Copy link
Author

ag21o9 commented Oct 9, 2024

please refer and merge now

@jinx-vi-0
Copy link
Owner

I don't believe this feature serves any practical purpose, so we will not proceed with it.

@jinx-vi-0 jinx-vi-0 closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants