diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 224db737..cc23398e 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -145,22 +145,13 @@ namespace NadekoBot .AddManual(this) .AddManual(uow) .AddManual(new RedisCache(Client.CurrentUser.Id)); + Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler))); var commandHandler = Services.GetService(); commandHandler.AddServices(Services); - LoadTypeReaders(typeof(NadekoBot).Assembly); - //setup typereaders - CommandService.AddTypeReader(new PermissionActionTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new CommandTypeReader(Client, CommandService)); - //todo module dependency - CommandService.AddTypeReader(new CommandOrCrTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new ModuleTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new ModuleOrCrTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new GuildTypeReader(Client, CommandService)); - //CommandService.AddTypeReader(new GuildDateTimeTypeReader()); } Services.Unload(typeof(IUnitOfWork)); // unload it after the startup } diff --git a/NadekoBot.Modules.Searches/Services/SearchesService.cs b/NadekoBot.Modules.Searches/Services/SearchesService.cs index 61114bd1..ded817e5 100644 --- a/NadekoBot.Modules.Searches/Services/SearchesService.cs +++ b/NadekoBot.Modules.Searches/Services/SearchesService.cs @@ -42,8 +42,7 @@ namespace NadekoBot.Modules.Searches.Services public List MagicItems { get; } = new List(); private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); - - //todo clear when module unloaded + public ConcurrentDictionary AutoHentaiTimers { get; } = new ConcurrentDictionary(); public ConcurrentDictionary AutoBoobTimers { get; } = new ConcurrentDictionary(); public ConcurrentDictionary AutoButtTimers { get; } = new ConcurrentDictionary();