Refactored bot class