public void Initialize(IWARBOT Bot, WarDB warDB)
        {
            this.bot    = Bot;
            this.db     = warDB;
            configStore = new ConcurrentDictionary <ulong, IGuildConfig>();

            System.Reflection.Assembly ass = System.Reflection.Assembly.GetEntryAssembly();

            Updates = typeof(WarBot.Storage.WarDB)
                      .Assembly
                      .DefinedTypes
                      .Where(o => o.ImplementedInterfaces.Contains(typeof(IBotUpdate)))
                      .Select(o => o.Assembly.CreateInstance(o.FullName))
                      .OfType <IBotUpdate>()
                      .ToArray();



            CurrentUpdate = Updates.Last();
        }
Example #2
0
 public CommandContext(DiscordSocketClient Client, SocketUserMessage Message, IWARBOT WarBot)
     : base(Client, Message)
 {
     this.bot = WarBot;
 }
 public GuildCommandContext(DiscordSocketClient Client, SocketUserMessage Message, IGuildConfig Config, IWARBOT WarBot)
     : base(Client, Message, WarBot)
 {
     this.cfg = Config;
 }
Example #4
0
 public WAR_Messages(IWARBOT Bot)
 {
     bot = Bot;
 }