From 3d3871f903eec31c767f21a28e1c00ff9e878a20 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Mon, 9 Oct 2017 02:59:00 +0200 Subject: [PATCH] Cleanup --- NadekoBot.Core/Services/NadekoBot.cs | 11 +---------- .../Services/SearchesService.cs | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) 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();