Switch to a command handler to make managing commands easier #1
Open
The0Show wants to merge 2 commits into
Open
Switch to a command handler to make managing commands easier #1The0Show wants to merge 2 commits into
The0Show wants to merge 2 commits into
Conversation
All commands have been migrated to use a command handler. Some things may be broken, especially in the rank command, but it seems to work for me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Keeping every command in the same main file can make it difficult to edit, especially with big/many commands.
Each command has been moved into its own class, which is read by the main file when it's time to run the command.
Each command file has it's own
SlashCommandBuilder, as well as aprivatevalue. When theprivatevalue istrue, the command will be registered only for the testing guild. Currently all commands have aprivatevalue oftrue, but it can be easily changed in the command'sconstructor.I've added comments to show what everything is doing, but if you have any other questions feel free to ask them :)
(Also keep in mind that some things may be broken, especially the rank command, but it seemed to work for me)