Refactoring BotTrait.