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

Sign and add refactor #34

Merged
merged 3 commits into from
Nov 4, 2020
Merged

Sign and add refactor #34

merged 3 commits into from
Nov 4, 2020

Conversation

CharlieHewitt
Copy link
Collaborator

Refactor done as part of #5

Summary of changes:

  • created add_signup() to add a user to their role in an operation (no validation on role being full -> check before calling)
  • refactored -sign and -add commands to use add_to_operation() for their common logic (validation, add_signup, write to json, update pinned post)
  • added missing method description comment to remove_signup()

Potential improvements for the future:

  • finish Automate role management #5
  • Deal with the 'error cases' in add_to_operation() in a different way (sending error messages ...) -> try not to pass context into add_to_operation() so it becomes independent of discord.py -> could be useful in the future.

@CharlieHewitt CharlieHewitt added the swtor cog Label for issues relating to the Swtor Cog commands. label Nov 4, 2020
@Maskonk Maskonk merged commit 351aaf8 into master Nov 4, 2020
@Maskonk Maskonk deleted the sign-and-add-refactor branch November 4, 2020 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swtor cog Label for issues relating to the Swtor Cog commands.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants