Update bot_lib.py

New version with database update fixed.