Small refactoring. Finally made use of the type parameter in NadekoTypeReader<T> class

This commit is contained in:
Kwoth
2022-01-31 05:45:51 +01:00
parent 0f36242597
commit 3e0bbd8ada
29 changed files with 130 additions and 128 deletions

View File

@@ -14,7 +14,7 @@ public partial class Administration
[Cmd]
[Priority(1)]
public async partial Task Prefix()
=> await ReplyConfirmLocalizedAsync(strs.prefix_current(Format.Code(CmdHandler.GetPrefix(ctx.Guild))));
=> await ReplyConfirmLocalizedAsync(strs.prefix_current(Format.Code(_cmdHandler.GetPrefix(ctx.Guild))));
[Cmd]
[RequireContext(ContextType.Guild)]
@@ -33,7 +33,7 @@ public partial class Administration
return;
var oldPrefix = prefix;
var newPrefix = CmdHandler.SetPrefix(ctx.Guild, toSet);
var newPrefix = _cmdHandler.SetPrefix(ctx.Guild, toSet);
await ReplyConfirmLocalizedAsync(strs.prefix_new(Format.Code(oldPrefix), Format.Code(newPrefix)));
}
@@ -44,12 +44,12 @@ public partial class Administration
{
if (string.IsNullOrWhiteSpace(toSet))
{
await ReplyConfirmLocalizedAsync(strs.defprefix_current(CmdHandler.GetPrefix()));
await ReplyConfirmLocalizedAsync(strs.defprefix_current(_cmdHandler.GetPrefix()));
return;
}
var oldPrefix = CmdHandler.GetPrefix();
var newPrefix = CmdHandler.SetDefaultPrefix(toSet);
var oldPrefix = _cmdHandler.GetPrefix();
var newPrefix = _cmdHandler.SetDefaultPrefix(toSet);
await ReplyConfirmLocalizedAsync(strs.defprefix_new(Format.Code(oldPrefix), Format.Code(newPrefix)));
}