added integration tests using bots, some refactoring of the bot's eventing system