moved all bot functionality into lib.rs