Closed Lunarmagpie closed 1 year ago
All the other db uses were handled in old PRs. This was missed when the highlights feature was introduced.
All the other db uses were handled in old PRs. This was missed when the highlights feature was introduced.
so things like the following fail gracefully if the database isn't available? https://github.com/mcb-dev/mCodingBot/blob/8bb548c7754b3e0a42aa756168da3983c92dfda3/mcodingbot/plugins/highlights.py#L67
You will get an error message that the db isn't set up I believe.
Would it be possible to tell hikari to just not enable anything in the module if no_db_mode
is set? maybe by just not importing it?
definitely but it would require modules to be loaded individually
I would prefer that but it depends on what everyone else thinks (CC: @CircuitSacul @trag1c). Otherwise lgtm.
idc
I think changing how modules are loaded is outside the scope of this pr anyways.
I guess this is a little out of scope of each other but i cba to make 2 separate PRs.
This is needed because
no_db_mode
being false by default adds an exception that kills the bot on launcher if a postgres database isn't running.