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

Create a wrapper for DB usage #97

Open
mklarz opened this issue Apr 30, 2021 · 0 comments
Open

Create a wrapper for DB usage #97

mklarz opened this issue Apr 30, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mklarz
Copy link
Contributor

mklarz commented Apr 30, 2021

We should not interact with the database directly through the other classes and functions, but rather have a wrapper for the database (a separate class or functions would work fine). i.e. we should not use:

if not db.teamdb[str(guild.id)].find_one({"chan_id": chan_id}):

but rather have a separate class and use it like so:

db = Database(guild.id)
db.get_chan(chan_id)
@mklarz mklarz added enhancement New feature or request good first issue Good for newcomers labels Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant