Why do we in some places access db like this "ctx.db.user" instead of simply "db.user"?

Just starting out and curious exactly what the ctx is used for.
2 Replies
cje
cje•7mo ago
at its most basic, its the same thing but putting the db in ctx lets you do some nice things like easier to write tests etc
xpru67
xpru67•6mo ago
Thank you for the reply! Could you give me a basic example so I understand it a bit clearer? 🙂
Want results from more Discord servers?
Add your server
More Posts