// Path: src/main/java/io/github/spugn/Sargo/Exceptions/FailedToReadSettingFileException.java
// public class FailedToReadSettingFileException extends SargoException
// {
//     private static final String ERROR_TITLE = "FAILED TO READ BANNER FILE";
//     private static final int ERROR_CODE = 102;
//     private final String ERROR_TEXT;
// 
//     public FailedToReadSettingFileException()
//     {
//         ERROR_TEXT = "An error has occurred when trying to read the Setting file.\n" +
//                 "Try restarting the bot or correct the issue manually.";
//     }
// 
//     @Override
//     public void displayErrorMessage()
//     {
//         System.out.println(ERROR_TITLE + " - " + ERROR_TEXT + "\nError Code: " + ERROR_CODE);
//     }
// }


import io.github.spugn.Sargo.Exceptions.FailedToReadSettingFileException;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.XMLEvent;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
package io.github.spugn.Sargo.XMLParsers;



/**
 * SETTINGS PARSER
 * <p>
 *     This class reads the Settings.xml file and saves the data
 *     to variables.
 * </p>
 *
 * @author S'pugn
 * @version 1.1
 * @since v1.0
 */

@Deprecated
public class SettingsParser
{
    /* BOT SETTINGS */
    private static String botToken;
    private static boolean isNoGUI;
    private static String gitHubRepoURL;
    private static String botOwnerDiscordID;

    /* COMMAND SETTINGS */
    private static boolean useMention;
    private static char commandPrefix;
    private static boolean deleteUserMessage;
    private static List<String> ignoredChannelNames;

    /* SCOUT SETTINGS */
    private static boolean isDisableImages;
    private static boolean isSimpleMessage;
    private static boolean isRarityStars;
    private static String scoutMaster;
    private static double copperRates;
    private static double silverRates;
    private static double goldRates;
    private static double platinumRates;
    private static List<Double> recordCrystalRates;
    private static List<Double> circulatingRecordCrystalRates;
    //private static List<Integer> goldBanners;
    //private static List<Integer> goldBannersv2;

    /* SHOP SETTINGS */
    private static int maxShopLimit;
    private static Map<String, Map<Double, Integer>> shopItems;

    public static String getBotToken() { return botToken; }
    public static boolean isNoGUI() { return isNoGUI; }
    public static String getGitHubRepoURL() { return gitHubRepoURL; }
    public static String getBotOwnerDiscordID() { return botOwnerDiscordID; }

    public static boolean isUseMention() { return useMention; }
    public static char getCommandPrefix() { return commandPrefix; }
    public static boolean isDeleteUserMessage() { return deleteUserMessage; }
    public static List<String> getIgnoredChannelNames() { return ignoredChannelNames; }

    public static boolean isDisableImages() { return isDisableImages; }
    public static boolean isSimpleMessage() { return isSimpleMessage; }
    public static boolean isRarityStars() { return  isRarityStars; }
    public static String getScoutMaster() { return scoutMaster; }
    public static double getCopperRates() { return copperRates; }
    public static double getSilverRates() { return silverRates; }
    public static double getGoldRates() { return goldRates; }
    public static double getPlatinumRates() { return platinumRates; }
    public static List<Double> getRecordCrystalRates() { return recordCrystalRates; }
    public static List<Double> getCirculatingRecordCrystalRates() { return circulatingRecordCrystalRates; }
    public static List<Integer> getGoldBanners() { return BannerParser.getGoldBanners(); }
    public static List<Integer> getGoldBannersv2() { return BannerParser.getGoldBannersv2(); }

    public static int getMaxShopLimit() { return maxShopLimit; }
    public static Map<String, Map<Double, Integer>> getShopItems() { return shopItems; }

    /**
     * Reads the data in the Settings.xml file and saves the data in variables.
     */
    public void reloadSettings(String configFile)
    {
        try
        {
            tryRead(configFile);
        }
// Path: src/main/java/io/github/spugn/Sargo/Exceptions/FailedToReadSettingFileException.java
// public class FailedToReadSettingFileException extends SargoException
// {
//     private static final String ERROR_TITLE = "FAILED TO READ BANNER FILE";
//     private static final int ERROR_CODE = 102;
//     private final String ERROR_TEXT;
// 
//     public FailedToReadSettingFileException()
//     {
//         ERROR_TEXT = "An error has occurred when trying to read the Setting file.\n" +
//                 "Try restarting the bot or correct the issue manually.";
//     }
// 
//     @Override
//     public void displayErrorMessage()
//     {
//         System.out.println(ERROR_TITLE + " - " + ERROR_TEXT + "\nError Code: " + ERROR_CODE);
//     }
// }


// Path: src/main/java/io/github/spugn/Sargo/XMLParsers/SettingsParser.java
import io.github.spugn.Sargo.Exceptions.FailedToReadSettingFileException;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.XMLEvent;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

package io.github.spugn.Sargo.XMLParsers;



/**
 * SETTINGS PARSER
 * <p>
 *     This class reads the Settings.xml file and saves the data
 *     to variables.
 * </p>
 *
 * @author S'pugn
 * @version 1.1
 * @since v1.0
 */

@Deprecated
public class SettingsParser
{
    /* BOT SETTINGS */
    private static String botToken;
    private static boolean isNoGUI;
    private static String gitHubRepoURL;
    private static String botOwnerDiscordID;

    /* COMMAND SETTINGS */
    private static boolean useMention;
    private static char commandPrefix;
    private static boolean deleteUserMessage;
    private static List<String> ignoredChannelNames;

    /* SCOUT SETTINGS */
    private static boolean isDisableImages;
    private static boolean isSimpleMessage;
    private static boolean isRarityStars;
    private static String scoutMaster;
    private static double copperRates;
    private static double silverRates;
    private static double goldRates;
    private static double platinumRates;
    private static List<Double> recordCrystalRates;
    private static List<Double> circulatingRecordCrystalRates;
    //private static List<Integer> goldBanners;
    //private static List<Integer> goldBannersv2;

    /* SHOP SETTINGS */
    private static int maxShopLimit;
    private static Map<String, Map<Double, Integer>> shopItems;

    public static String getBotToken() { return botToken; }
    public static boolean isNoGUI() { return isNoGUI; }
    public static String getGitHubRepoURL() { return gitHubRepoURL; }
    public static String getBotOwnerDiscordID() { return botOwnerDiscordID; }

    public static boolean isUseMention() { return useMention; }
    public static char getCommandPrefix() { return commandPrefix; }
    public static boolean isDeleteUserMessage() { return deleteUserMessage; }
    public static List<String> getIgnoredChannelNames() { return ignoredChannelNames; }

    public static boolean isDisableImages() { return isDisableImages; }
    public static boolean isSimpleMessage() { return isSimpleMessage; }
    public static boolean isRarityStars() { return  isRarityStars; }
    public static String getScoutMaster() { return scoutMaster; }
    public static double getCopperRates() { return copperRates; }
    public static double getSilverRates() { return silverRates; }
    public static double getGoldRates() { return goldRates; }
    public static double getPlatinumRates() { return platinumRates; }
    public static List<Double> getRecordCrystalRates() { return recordCrystalRates; }
    public static List<Double> getCirculatingRecordCrystalRates() { return circulatingRecordCrystalRates; }
    public static List<Integer> getGoldBanners() { return BannerParser.getGoldBanners(); }
    public static List<Integer> getGoldBannersv2() { return BannerParser.getGoldBannersv2(); }

    public static int getMaxShopLimit() { return maxShopLimit; }
    public static Map<String, Map<Double, Integer>> getShopItems() { return shopItems; }

    /**
     * Reads the data in the Settings.xml file and saves the data in variables.
     */
    public void reloadSettings(String configFile)
    {
        try
        {
            tryRead(configFile);
        }
        catch (FailedToReadSettingFileException e)