DRY up error handling
Move to bot.rb