code with bot class