-
Notifications
You must be signed in to change notification settings - Fork 12
1.4.0 Release: Controller Refactor #109
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
Merged
Merged
Conversation
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
Added !help msg for !verify
Added a class for a base command, the class helps standardizes commands, this class is currently in here temporarily, but should be extracted later.
Moved the BaseCommand class out of roles into separate file, renamed as Command in Role controller, cleaned up ctrl array.
Controllers now extend from BaseController. Most commands work.
Cleaned up excess code comments. Old code comments
Added controllerUtils.js, contains a random code generation method. Aforementioned used in verify.js.
There was an issue accessing "this" from controller actions. This is now fixed by binding the controller. Cleaned up client.js and index.js to be more semantic and have better comments.
Spread commands array out one item per line, added more semantic comments.
Fixed export for codeGenerator.
Set showWithHelp in command to false to hide command from help menu.
Commands can now be admin-only. Admin roles are defined in baseController.js.
controllerUtils.js is now botUtils.js, a new isAdmin util can check if a guild member object is an admin. The help command now hides admin-only commands from non-admin users.
Made sure formatting was consistent across all command information. Added formatting and hints for required and optional items.
Test on `roles.js` checked for # of functions, controller file now uses a class, rendering test ineffective.
Controller Cleanup Project
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.
No description provided.