Users should not need to check that BotBase.stats is not None every time they try to use it, as it never should be None.
We can avoid this by internally using a BotBase._stats attribute that can be None, and exposing a stats property that raises an error if BotBase._stats is None, and otherwise returns the stats client.
I think we should also do this for BotBase.api_client. Whilst it is a slightly different case in that it can be None, it should either always be None or never be None, so the same reasoning applies. If it's always None it makes no sense to access it anyway and it should raise an error.
Users should not need to check that
BotBase.statsis notNoneevery time they try to use it, as it never should beNone.We can avoid this by internally using a
BotBase._statsattribute that can beNone, and exposing astatsproperty that raises an error ifBotBase._statsisNone, and otherwise returns the stats client.I think we should also do this for
BotBase.api_client. Whilst it is a slightly different case in that it can beNone, it should either always beNoneor never beNone, so the same reasoning applies. If it's alwaysNoneit makes no sense to access it anyway and it should raise an error.