Skip to content

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 19 commits into from
Feb 20, 2018
Merged

1.4.0 Release: Controller Refactor #109

merged 19 commits into from
Feb 20, 2018

Conversation

reactivepixel
Copy link
Owner

No description provided.

reactivepixel and others added 19 commits November 29, 2017 13:09
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.
@reactivepixel reactivepixel merged commit 8f7fb8a into release Feb 20, 2018
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