public static function addBot($filename) { $bot = bot::getInstance(); $config = bot::parseConfig($filename); if ($config == false) { return false; } $newBot = new botClass(); $newBot->config = $config; $newBot->configFilename = $filename; $bot->bots[] = $newBot; $bot->createBot($newBot); return true; }