mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): better error message in pk;cfg member|group limits
This commit is contained in:
parent
d1dd4477d1
commit
857b4d5c26
2 changed files with 8 additions and 0 deletions
|
|
@ -546,6 +546,8 @@ public partial class CommandTree
|
||||||
return ctx.Execute<Config>(null, m => m.HidDisplayCaps(ctx));
|
return ctx.Execute<Config>(null, m => m.HidDisplayCaps(ctx));
|
||||||
if (ctx.MatchMultiple(new[] { "pad" }, new[] { "id", "ids" }) || ctx.MatchMultiple(new[] { "id" }, new[] { "pad", "padding" }) || ctx.Match("idpad", "padid", "padids"))
|
if (ctx.MatchMultiple(new[] { "pad" }, new[] { "id", "ids" }) || ctx.MatchMultiple(new[] { "id" }, new[] { "pad", "padding" }) || ctx.Match("idpad", "padid", "padids"))
|
||||||
return ctx.Execute<Config>(null, m => m.HidListPadding(ctx));
|
return ctx.Execute<Config>(null, m => m.HidListPadding(ctx));
|
||||||
|
if (ctx.MatchMultiple(new[] { "member", "group" }, new[] { "limit" }) || ctx.Match("limit"))
|
||||||
|
return ctx.Execute<Config>(null, m => m.LimitUpdate(ctx));
|
||||||
|
|
||||||
// todo: maybe add the list of configuration keys here?
|
// todo: maybe add the list of configuration keys here?
|
||||||
return ctx.Reply($"{Emojis.Error} Could not find a setting with that name. Please see `pk;commands config` for the list of possible config settings.");
|
return ctx.Reply($"{Emojis.Error} Could not find a setting with that name. Please see `pk;commands config` for the list of possible config settings.");
|
||||||
|
|
|
||||||
|
|
@ -536,4 +536,10 @@ public class Config
|
||||||
}
|
}
|
||||||
else throw new PKError(badInputError);
|
else throw new PKError(badInputError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task LimitUpdate(Context ctx)
|
||||||
|
{
|
||||||
|
throw new PKError("You cannot update your own member or group limits. If you need a limit update, please join the " +
|
||||||
|
"support server and ask in #bot-support: https://discord.gg/PczBt78");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue