All this logic should be in the bot model, not in the controller.