Search in sources :

Example 6 with PatchObject

use of com.github.vaerys.objects.PatchObject in project DiscordSailv2 by Vaerys-Dawn.

the class PatchHandler method getJsonConfig.

private static PatchObject getJsonConfig(IGuild guild, String file, double patchID, String patch) {
    String path = Utility.getFilePath(guild.getLongID(), file);
    // check if file exists:
    if (!FileHandler.exists(path))
        return null;
    JsonObject json = FileHandler.fileToJsonObject(path);
    if (checkPatch(patchID, guild, patch, json))
        return null;
    return new PatchObject(json, path, patchID);
}
Also used : PatchObject(com.github.vaerys.objects.PatchObject) JsonObject(com.google.gson.JsonObject)

Aggregations

PatchObject (com.github.vaerys.objects.PatchObject)6 JsonArray (com.google.gson.JsonArray)4 JsonObject (com.google.gson.JsonObject)3 ChannelSetting (com.github.vaerys.enums.ChannelSetting)1