- Started cleanup of command handler

- Removed IUnloadableService
- Started removing INService (removed it from services which implement behavior interfaces) - wip
- Added scrutor for better service registration - wip
This commit is contained in:
Kwoth
2021-06-28 23:20:02 +02:00
parent 1e90d7f7bb
commit 3c82c1f919
30 changed files with 217 additions and 360 deletions

View File

@@ -28,7 +28,7 @@ using Image = SixLabors.ImageSharp.Image;
namespace NadekoBot.Modules.Xp.Services
{
public class XpService : INService, IUnloadableService
public class XpService : INService
{
private enum NotifOf
{
@@ -1182,14 +1182,6 @@ namespace NadekoBot.Modules.Xp.Services
}
}
public Task Unload()
{
_cmd.OnMessageNoTrigger -= _cmd_OnMessageNoTrigger;
_client.UserVoiceStateUpdated -= _client_OnUserVoiceStateUpdated;
_client.GuildAvailable -= _client_OnGuildAvailable;
return Task.CompletedTask;
}
public void XpReset(ulong guildId, ulong userId)
{
using (var uow = _db.GetDbContext())