Skip to content

Switch to a command handler to make managing commands easier #1

Open
The0Show wants to merge 2 commits into
BeatLeader:masterfrom
The0Show:command-handler
Open

Switch to a command handler to make managing commands easier #1
The0Show wants to merge 2 commits into
BeatLeader:masterfrom
The0Show:command-handler

Conversation

@The0Show

Copy link
Copy Markdown

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 a private value. When the private value is true, the command will be registered only for the testing guild. Currently all commands have a private value of true, but it can be easily changed in the command's constructor.

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)

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.
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.

1 participant