// 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 ws.nmathe.saber.Main;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
package ws.nmathe.saber.core;



/**
 * Simple class which maintains a list of timestamps of the last command
 * message that a user sent (within the bot's current runtime instance)
 */
public class RateLimiter
{
    private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
// 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/RateLimiter.java
import ws.nmathe.saber.Main;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

package ws.nmathe.saber.core;



/**
 * Simple class which maintains a list of timestamps of the last command
 * message that a user sent (within the bot's current runtime instance)
 */
public class RateLimiter
{
    private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
    private long startThreshold = Main.getBotSettingsManager().getCooldownThreshold();