- 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

@@ -3,7 +3,6 @@ using System.Collections.Concurrent;
using System.Linq;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Modules.Games.Common;
using NadekoBot.Db.Models;
@@ -16,7 +15,7 @@ using Serilog;
namespace NadekoBot.Modules.Games.Services
{
public class PollService : IEarlyBehavior, INService
public class PollService : IEarlyBehavior
{
public ConcurrentDictionary<ulong, PollRunner> ActivePolls { get; } = new ConcurrentDictionary<ulong, PollRunner>();
@@ -106,7 +105,7 @@ namespace NadekoBot.Modules.Games.Services
try { await msg.DeleteAsync().ConfigureAwait(false); } catch { }
}
public async Task<bool> RunBehavior(DiscordSocketClient client, IGuild guild, IUserMessage msg)
public async Task<bool> RunBehavior(IGuild guild, IUserMessage msg)
{
if (guild is null)
return false;