[BUG] MongoDB error-handling
The bot replies with success message even if MongoDB server is not available.
How to produce the bug:
- Start MongoDB server.
- Start the bot.
- Shutdown the MongoDB server.
- Use bot commands.

Yes, I can reproduce this. The reply from bot takes some time(30seconds) which is probably when the request to DB times out.
@rgroves We can stop the bot when the DB gets disconnected the connection times out?
LIstBot needs better error handling. In some places, especially in most commands when interacting with the database, it's non-existent.
I think it would be good to have two things done in starting to address this issue, and this probably needs some further examination of the codebase to see exactly what needs doing, but in general:
-
Allow user to make connection timeout configurable—meaning they can lower the timeout value by overriding in the .env file. (this will make testing easier as well, so you won't need to wait the full 30 second default timeout).
-
Add try...catch blocks where needed in the commands so that we can capture, log, and report back a clear message to bot users when there is an issue.
This is something that definitely should be addressed.