Cleanup
This commit is contained in:
parent
a12702fb68
commit
3d3871f903
@ -145,22 +145,13 @@ namespace NadekoBot
|
|||||||
.AddManual<NadekoBot>(this)
|
.AddManual<NadekoBot>(this)
|
||||||
.AddManual<IUnitOfWork>(uow)
|
.AddManual<IUnitOfWork>(uow)
|
||||||
.AddManual<IDataCache>(new RedisCache(Client.CurrentUser.Id));
|
.AddManual<IDataCache>(new RedisCache(Client.CurrentUser.Id));
|
||||||
|
|
||||||
Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler)));
|
Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler)));
|
||||||
|
|
||||||
var commandHandler = Services.GetService<CommandHandler>();
|
var commandHandler = Services.GetService<CommandHandler>();
|
||||||
commandHandler.AddServices(Services);
|
commandHandler.AddServices(Services);
|
||||||
|
|
||||||
|
|
||||||
LoadTypeReaders(typeof(NadekoBot).Assembly);
|
LoadTypeReaders(typeof(NadekoBot).Assembly);
|
||||||
//setup typereaders
|
|
||||||
CommandService.AddTypeReader<PermissionAction>(new PermissionActionTypeReader(Client, CommandService));
|
|
||||||
CommandService.AddTypeReader<CommandInfo>(new CommandTypeReader(Client, CommandService));
|
|
||||||
//todo module dependency
|
|
||||||
CommandService.AddTypeReader<CommandOrCrInfo>(new CommandOrCrTypeReader(Client, CommandService));
|
|
||||||
CommandService.AddTypeReader<ModuleInfo>(new ModuleTypeReader(Client, CommandService));
|
|
||||||
CommandService.AddTypeReader<ModuleOrCrInfo>(new ModuleOrCrTypeReader(Client, CommandService));
|
|
||||||
CommandService.AddTypeReader<IGuild>(new GuildTypeReader(Client, CommandService));
|
|
||||||
//CommandService.AddTypeReader<GuildDateTime>(new GuildDateTimeTypeReader());
|
|
||||||
}
|
}
|
||||||
Services.Unload(typeof(IUnitOfWork)); // unload it after the startup
|
Services.Unload(typeof(IUnitOfWork)); // unload it after the startup
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ namespace NadekoBot.Modules.Searches.Services
|
|||||||
|
|
||||||
private readonly ConcurrentDictionary<ulong, SearchImageCacher> _imageCacher = new ConcurrentDictionary<ulong, SearchImageCacher>();
|
private readonly ConcurrentDictionary<ulong, SearchImageCacher> _imageCacher = new ConcurrentDictionary<ulong, SearchImageCacher>();
|
||||||
|
|
||||||
//todo clear when module unloaded
|
|
||||||
public ConcurrentDictionary<ulong, Timer> AutoHentaiTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
public ConcurrentDictionary<ulong, Timer> AutoHentaiTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
||||||
public ConcurrentDictionary<ulong, Timer> AutoBoobTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
public ConcurrentDictionary<ulong, Timer> AutoBoobTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
||||||
public ConcurrentDictionary<ulong, Timer> AutoButtTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
public ConcurrentDictionary<ulong, Timer> AutoButtTimers { get; } = new ConcurrentDictionary<ulong, Timer>();
|
||||||
|
Loading…
Reference in New Issue
Block a user