Replace error with warning on legacy proxy command
This commit is contained in:
parent
3ce1078dc6
commit
594bcc5b7b
@ -106,10 +106,14 @@ namespace PluralKit.Bot.Commands
|
|||||||
var requestedTag = ParseProxyTags(ctx.RemainderOrNull());
|
var requestedTag = ParseProxyTags(ctx.RemainderOrNull());
|
||||||
if (requestedTag.IsEmpty) throw Errors.EmptyProxyTags(target);
|
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.
|
// already more than one proxy tag.
|
||||||
if (target.ProxyTags.Count > 1)
|
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))
|
if (!await WarnOnConflict(requestedTag))
|
||||||
throw Errors.GenericCancelled();
|
throw Errors.GenericCancelled();
|
||||||
|
Loading…
Reference in New Issue
Block a user