More cleanup, namespace fixes, convenience methods for IKernel

This commit is contained in:
Kwoth
2023-04-07 00:41:31 +02:00
parent 2c63b1cce7
commit 4bc3147697
131 changed files with 217 additions and 338 deletions

View File

@@ -1,9 +1,5 @@
#nullable enable
using Nadeko.Snake;
using NadekoBot.Common;
using NadekoBot.Services;
[DIIgnore]
public sealed class BehaviorAdapter : ICustomBehavior
{
@@ -12,6 +8,8 @@ public sealed class BehaviorAdapter : ICustomBehavior
private readonly IServiceProvider _services;
private readonly string _name;
public string Name => _name;
// unused
public int Priority
=> 0;
@@ -53,7 +51,7 @@ public sealed class BehaviorAdapter : ICustomBehavior
{
if (!_snekWr.TryGetTarget(out var snek))
return null;
return await snek.ExecInputTransformAsync(guild, channel, user, input);
}
@@ -69,7 +67,7 @@ public sealed class BehaviorAdapter : ICustomBehavior
{
if (!_snekWr.TryGetTarget(out var snek))
return;
await snek.ExecPostCommandAsync(ContextAdapterFactory.CreateNew(context, _strings, _services),
moduleName,
commandName);