add event handling to bot