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

Use polymorphism to treat inputs. #9

Open
lugope opened this issue May 3, 2018 · 1 comment
Open

Use polymorphism to treat inputs. #9

lugope opened this issue May 3, 2018 · 1 comment
Assignees
Labels
refactoring Refactor the code
Milestone

Comments

@lugope
Copy link
Contributor

lugope commented May 3, 2018

Use polymorphism to treat the conditions in the handle_updates() method. The method should be refactored because there are too many "if else" to handle the user inputs.

@lugope lugope added the refactoring Refactor the code label May 3, 2018
@lugope lugope self-assigned this May 3, 2018
@lugope
Copy link
Contributor Author

lugope commented May 7, 2018

  • Create Strategy structure tome make each bot command be a class.
  • Create dictionary with all the commands objects, so the main class can access each command.
  • Make the bot as a Singleton so the commands objects can modify the same bot attributes.
  • Extract the methods from the taskbot.py to it respective BotCommand class.

@ViBorges ViBorges added this to the 2nd release milestone Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor the code
Projects
None yet
Development

No branches or pull requests

2 participants