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 decorators - not if else #15

Open
mridulganga opened this issue Aug 30, 2019 · 0 comments
Open

Use decorators - not if else #15

mridulganga opened this issue Aug 30, 2019 · 0 comments

Comments

@mridulganga
Copy link
Owner

mridulganga commented Aug 30, 2019

The entire code is structured in a if else format.
Makes it less maintainable.

We could use a functional approach.

ex-

@app.command("pls bankrob <username>")
def mono_bankrob(bot,update,username):
    pass

this would make it similar to flask, so nice

@mridulganga mridulganga changed the title Use functions - not if else Use decorators - not if else Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant