mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
feat(bot): update deprecated command warning for pk;serverconfig
This commit is contained in:
parent
17f094354d
commit
a0b528d4af
2 changed files with 1 additions and 15 deletions
|
|
@ -215,12 +215,6 @@ public partial class CommandTree
|
||||||
else if (ctx.Match("commands", "help"))
|
else if (ctx.Match("commands", "help"))
|
||||||
await PrintCommandList(ctx, "systems", SystemCommands);
|
await PrintCommandList(ctx, "systems", SystemCommands);
|
||||||
|
|
||||||
// these are deprecated (and not accessible by other users anyway), let's leave them out of new parsing
|
|
||||||
else if (ctx.Match("timezone", "tz"))
|
|
||||||
await ctx.Execute<Config>(ConfigTimezone, m => m.SystemTimezone(ctx), true);
|
|
||||||
else if (ctx.Match("ping"))
|
|
||||||
await ctx.Execute<Config>(ConfigPing, m => m.SystemPing(ctx), true);
|
|
||||||
|
|
||||||
// todo: these aren't deprecated but also shouldn't be here
|
// todo: these aren't deprecated but also shouldn't be here
|
||||||
else if (ctx.Match("webhook", "hook"))
|
else if (ctx.Match("webhook", "hook"))
|
||||||
await ctx.Execute<Api>(null, m => m.SystemWebhook(ctx));
|
await ctx.Execute<Api>(null, m => m.SystemWebhook(ctx));
|
||||||
|
|
@ -561,13 +555,6 @@ public partial class CommandTree
|
||||||
if (ctx.System == null)
|
if (ctx.System == null)
|
||||||
return ctx.Reply($"{Emojis.Error} {Errors.NoSystemError.Message}");
|
return ctx.Reply($"{Emojis.Error} {Errors.NoSystemError.Message}");
|
||||||
|
|
||||||
// todo: move this whole block to Autoproxy.cs when these are removed
|
|
||||||
|
|
||||||
if (ctx.Match("account", "ac"))
|
|
||||||
return ctx.Execute<Config>(ConfigAutoproxyAccount, m => m.AutoproxyAccount(ctx), true);
|
|
||||||
if (ctx.Match("timeout", "tm"))
|
|
||||||
return ctx.Execute<Config>(ConfigAutoproxyTimeout, m => m.AutoproxyTimeout(ctx), true);
|
|
||||||
|
|
||||||
return ctx.Execute<Autoproxy>(AutoproxySet, m => m.SetAutoproxyMode(ctx));
|
return ctx.Execute<Autoproxy>(AutoproxySet, m => m.SetAutoproxyMode(ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,7 @@ public class Context
|
||||||
|
|
||||||
if (deprecated && commandDef != null)
|
if (deprecated && commandDef != null)
|
||||||
{
|
{
|
||||||
await Reply($"{Emojis.Warn} This command has been removed. please use `pk;{commandDef.Key}` instead.");
|
await Reply($"{Emojis.Warn} Server configuration has moved to `pk;serverconfig`. The command you are trying to run is now `pk;{commandDef.Key}`.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue