// Path: src/main/java/ws/nmathe/saber/Main.java
// public class Main
// {
//     private static ShardManager shardManager;
//     private static BotSettingsManager botSettingsManager     = new BotSettingsManager();
//     private static EntryManager entryManager                 = new EntryManager();
//     private static ScheduleManager scheduleManager           = new ScheduleManager();
//     private static CommandHandler commandHandler             = new CommandHandler();
//     private static CalendarConverter calendarConverter       = new CalendarConverter();
//     private static GuildSettingsManager guildSettingsManager = new GuildSettingsManager();
//     private static Driver mongoDriver                        = new Driver();
// 
//     /**
//      * initialize the bot
//      */
//     public static void main(String[] args)
//     {
//         if(botSettingsManager.hasSettings())
//         {
//             Logging.info(Main.class, "A 'saber.toml' configuration file has been created. Add your " +
//                     "bot token to the file and restart the bot.\n");
//             System.exit(0);
//         }
// 
//         mongoDriver.init();         // ready database
//         calendarConverter.init();   // connect to calendar service
// 
//         // create the shard manager
//         shardManager = new ShardManager(botSettingsManager.getShards(), botSettingsManager.getShardTotal());
//     }
// 
//     /*
//      * Getters for manager type objects
//      */
// 
//     public static ShardManager getShardManager()
//     {
//         return shardManager;
//     }
// 
//     public static BotSettingsManager getBotSettingsManager()
//     {
//         return botSettingsManager;
//     }
// 
//     public static CommandHandler getCommandHandler()
//     {
//         return commandHandler;
//     }
// 
//     public static EntryManager getEntryManager()
//     {
//         return entryManager;
//     }
// 
//     public static ScheduleManager getScheduleManager()
//     {
//        return scheduleManager;
//     }
// 
//     public static GuildSettingsManager getGuildSettingsManager()
//     {
//         return guildSettingsManager;
//     }
// 
//     public static CalendarConverter getCalendarConverter()
//     {
//         return calendarConverter;
//     }
// 
//     public static Driver getDBDriver()
//     {
//         return mongoDriver;
//     }
// }


import org.bson.Document;
import ws.nmathe.saber.Main;
import ws.nmathe.saber.commands.general.*;
import java.util.ArrayList;
import java.util.Arrays;
import static com.mongodb.client.model.Filters.eq;
import static com.mongodb.client.model.Updates.set;
package ws.nmathe.saber.core.settings;




/**
 * manager for guild setting options
 */
public class GuildSettingsManager
{
    /**
     * retrieves the guild settings object for a guild
     * @param guildId ID of guild
     * @return GuildSettings object (never null)
     */
    public GuildSettings getGuildSettings(String guildId)
    {
// Path: src/main/java/ws/nmathe/saber/Main.java
// public class Main
// {
//     private static ShardManager shardManager;
//     private static BotSettingsManager botSettingsManager     = new BotSettingsManager();
//     private static EntryManager entryManager                 = new EntryManager();
//     private static ScheduleManager scheduleManager           = new ScheduleManager();
//     private static CommandHandler commandHandler             = new CommandHandler();
//     private static CalendarConverter calendarConverter       = new CalendarConverter();
//     private static GuildSettingsManager guildSettingsManager = new GuildSettingsManager();
//     private static Driver mongoDriver                        = new Driver();
// 
//     /**
//      * initialize the bot
//      */
//     public static void main(String[] args)
//     {
//         if(botSettingsManager.hasSettings())
//         {
//             Logging.info(Main.class, "A 'saber.toml' configuration file has been created. Add your " +
//                     "bot token to the file and restart the bot.\n");
//             System.exit(0);
//         }
// 
//         mongoDriver.init();         // ready database
//         calendarConverter.init();   // connect to calendar service
// 
//         // create the shard manager
//         shardManager = new ShardManager(botSettingsManager.getShards(), botSettingsManager.getShardTotal());
//     }
// 
//     /*
//      * Getters for manager type objects
//      */
// 
//     public static ShardManager getShardManager()
//     {
//         return shardManager;
//     }
// 
//     public static BotSettingsManager getBotSettingsManager()
//     {
//         return botSettingsManager;
//     }
// 
//     public static CommandHandler getCommandHandler()
//     {
//         return commandHandler;
//     }
// 
//     public static EntryManager getEntryManager()
//     {
//         return entryManager;
//     }
// 
//     public static ScheduleManager getScheduleManager()
//     {
//        return scheduleManager;
//     }
// 
//     public static GuildSettingsManager getGuildSettingsManager()
//     {
//         return guildSettingsManager;
//     }
// 
//     public static CalendarConverter getCalendarConverter()
//     {
//         return calendarConverter;
//     }
// 
//     public static Driver getDBDriver()
//     {
//         return mongoDriver;
//     }
// }


// Path: src/main/java/ws/nmathe/saber/core/settings/GuildSettingsManager.java
import org.bson.Document;
import ws.nmathe.saber.Main;
import ws.nmathe.saber.commands.general.*;
import java.util.ArrayList;
import java.util.Arrays;
import static com.mongodb.client.model.Filters.eq;
import static com.mongodb.client.model.Updates.set;

package ws.nmathe.saber.core.settings;




/**
 * manager for guild setting options
 */
public class GuildSettingsManager
{
    /**
     * retrieves the guild settings object for a guild
     * @param guildId ID of guild
     * @return GuildSettings object (never null)
     */
    public GuildSettings getGuildSettings(String guildId)
    {
        Document guildDoc = Main.getDBDriver().getGuildCollection().find(eq("_id", guildId)).first();