Update bot_lib.py

Fixed database update model. It was replacing entries wrongly.