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

Migrated from Message Commands to Slash Commands #40

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

rishabh7923
Copy link
Contributor

@rishabh7923 rishabh7923 commented Oct 10, 2024

This is the solution to the issue #15.
To efficiently fix implement slash commands for this bot, I have done the following:

  • Added a simple and concise command handler.
  • Organized the structure to make components easily accessible.
  • Created a new command named ";register" that developers can use to register slash commands globally or locally.
  • Added an interaction event to handle all slash command and button-related interactions.
  • Implemented improved caching for issues by storing them in a JSON file.
  • Avoided unnecessary code refactoring.

Keep In Mind

  • I added a new environment variable called "DEVELOPER_ID" for the register command. This ensures that only the developer can run the "register" command.
  • Make sure not to run ";register global" on a server where you have already executed ";register guild." If you do, you will end up with duplicate commands (this can be fixed by kicking the bot and reinviting it).
2024-10-11.02-29-00.mp4

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer from DDoL team will review it as soon as possible. We appreciate your support in making this project better

@sudo-dpkg sudo-dpkg merged commit 3a7cf25 into sudo-dpkg:main Oct 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants