mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Replace error with warning on legacy proxy command
This commit is contained in:
parent
3ce1078dc6
commit
594bcc5b7b
1 changed files with 6 additions and 2 deletions
|
|
@ -106,10 +106,14 @@ namespace PluralKit.Bot.Commands
|
|||
var requestedTag = ParseProxyTags(ctx.RemainderOrNull());
|
||||
if (requestedTag.IsEmpty) throw Errors.EmptyProxyTags(target);
|
||||
|
||||
// This is mostly a legacy command, so it's gonna error out if there's
|
||||
// This is mostly a legacy command, so it's gonna warn if there's
|
||||
// already more than one proxy tag.
|
||||
if (target.ProxyTags.Count > 1)
|
||||
throw Errors.LegacyAlreadyHasProxyTag(requestedTag, target);
|
||||
{
|
||||
var msg = await ctx.Reply($"This member already has more than one proxy tag set: {target.ProxyTagsString().SanitizeMentions()}\nDo you want to replace them?");
|
||||
if (!await ctx.PromptYesNo(msg))
|
||||
throw Errors.GenericCancelled();
|
||||
}
|
||||
|
||||
if (!await WarnOnConflict(requestedTag))
|
||||
throw Errors.GenericCancelled();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue