Bot event loop