mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 10:10:12 +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());
|
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…
Add table
Add a link
Reference in a new issue