mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): remove deprecated commands
This commit is contained in:
parent
13efdbee83
commit
f3c02a4254
1 changed files with 6 additions and 3 deletions
|
|
@ -110,6 +110,12 @@ public class Context
|
||||||
{
|
{
|
||||||
_currentCommand = commandDef;
|
_currentCommand = commandDef;
|
||||||
|
|
||||||
|
if (deprecated && commandDef != null)
|
||||||
|
{
|
||||||
|
await Reply($"{Emojis.Warn} This command has been removed. please use `pk;{commandDef.Key}` instead.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (_metrics.Measure.Timer.Time(BotMetrics.CommandTime, new MetricTags("Command", commandDef?.Key ?? "null")))
|
using (_metrics.Measure.Timer.Time(BotMetrics.CommandTime, new MetricTags("Command", commandDef?.Key ?? "null")))
|
||||||
|
|
@ -130,9 +136,6 @@ public class Context
|
||||||
// Got a complaint the old error was a bit too patronizing. Hopefully this is better?
|
// Got a complaint the old error was a bit too patronizing. Hopefully this is better?
|
||||||
await Reply($"{Emojis.Error} Operation timed out, sorry. Try again, perhaps?");
|
await Reply($"{Emojis.Error} Operation timed out, sorry. Try again, perhaps?");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deprecated && commandDef != null)
|
|
||||||
await Reply($"{Emojis.Warn} This command is deprecated and will be removed soon. In the future, please use `pk;{commandDef.Key}`.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue