take away bot-> so it becomes:
if ($this -> admin -> in_group($user, "xxxxxgroup"))
since you are inside the Bot class, $this means the instance of the bot class. whereas $this ->bot which is used inside modules means a reference to the same class. Note that in the beginning/constructor of each module, a reference to the bot class is stored in a variable called $bot, hence u can access functions inside the bot class by doing $this ->bot->bot_class_function. In this case $this means the module class.