- Renamed Prefix to prefix

- Updated some command string keys which were using command name to use method names now
This commit is contained in:
Kwoth
2022-01-02 16:52:39 +01:00
parent 2edda76218
commit ca9fa1b0ac
18 changed files with 91 additions and 93 deletions

View File

@@ -13,26 +13,26 @@ public partial class Administration
[Cmd]
[Priority(1)]
public async partial Task PrefixCommand()
public async partial Task Prefix()
=> await ReplyConfirmLocalizedAsync(strs.prefix_current(Format.Code(CmdHandler.GetPrefix(ctx.Guild))));
[Cmd]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
[Priority(0)]
public partial Task PrefixCommand(Set _, [Leftover] string prefix)
=> PrefixCommand(prefix);
public partial Task Prefix(Set _, [Leftover] string prefix)
=> Prefix(prefix);
[Cmd]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
[Priority(0)]
public async partial Task PrefixCommand([Leftover] string prefix)
public async partial Task Prefix([Leftover] string prefix)
{
if (string.IsNullOrWhiteSpace(prefix))
return;
var oldPrefix = Prefix;
var oldPrefix = base.prefix;
var newPrefix = CmdHandler.SetPrefix(ctx.Guild, prefix);
await ReplyConfirmLocalizedAsync(strs.prefix_new(Format.Code(oldPrefix), Format.Code(newPrefix)));