public static void main(String[] args) throws Exception {
		System.out.println("-----Lightbot by SmallDeadGuy-----");
		File file = new File("logs");
		if(!file.exists() || !file.isDirectory())
			file.mkdir();
		
		System.out.println("Loading config.json");
		Gson gson = new Gson();
		File config = new File("config.json");
		String json = "";
		if(config.exists()) {
			System.out.println("Config found, reading json");
			BufferedReader reader = new BufferedReader(new FileReader(config));
			String line = "";
			while((line = reader.readLine()) != null)
				json += (json.isEmpty() ? "" : "\n") + line;
			reader.close();
			
			BotProperties[] bots = gson.fromJson(json, BotProperties[].class);
			for(BotProperties bot : bots) {
				System.out.println("Creating bot " + bot.nick + " on server " + bot.server);
				LightBot lbot = new LightBot(bot);
				lbots.add(lbot);
			}
		}
		else {
			System.out.println("No config found, using default");
			BotProperties bot = new BotProperties();
			LightBot lbot = new LightBot(bot);
			lbots.add(lbot);
			
			json = gson.toJson(new BotProperties[] {bot}, BotProperties[].class);
			FileWriter writer = new FileWriter(config);
			writer.write(json);
			writer.close();
		}
	}