Medusa System Added

Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
This commit is contained in:
Kwoth
2022-04-16 12:44:46 +00:00
parent 3a516ab32a
commit 7cb15f5278
103 changed files with 3363 additions and 203 deletions

View File

@@ -5,7 +5,7 @@ using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Administration.Services;
public class DiscordPermOverrideService : INService, ILateBlocker
public class DiscordPermOverrideService : INService, IExecPreCommand
{
public int Priority { get; } = int.MaxValue;
private readonly DbService _db;
@@ -118,7 +118,7 @@ public class DiscordPermOverrideService : INService, ILateBlocker
.ToListAsync();
}
public async Task<bool> TryBlockLate(ICommandContext context, string moduleName, CommandInfo command)
public async Task<bool> ExecPreCommandAsync(ICommandContext context, string moduleName, CommandInfo command)
{
if (TryGetOverrides(context.Guild?.Id ?? 0, command.Name, out var perm) && perm is not null)
{