Add forgotten conditional to proxy tag clear disclaimer

This commit is contained in:
Ske 2019-10-30 08:44:17 +01:00
parent b50c123ad4
commit acadad2a43

View File

@ -168,10 +168,13 @@ namespace PluralKit.Bot.Commands
if (!ctx.HasNext()) if (!ctx.HasNext())
{ {
// If we already have multiple tags, this would clear everything, so prompt that // If we already have multiple tags, this would clear everything, so prompt that
if (target.ProxyTags.Count > 1)
{
var msg = await ctx.Reply( var msg = await ctx.Reply(
$"{Emojis.Warn} You already have multiple proxy tags set: {target.ProxyTagsString()}\nDo you want to clear them all?"); $"{Emojis.Warn} You already have multiple proxy tags set: {target.ProxyTagsString()}\nDo you want to clear them all?");
if (!await ctx.PromptYesNo(msg)) if (!await ctx.PromptYesNo(msg))
throw Errors.GenericCancelled(); throw Errors.GenericCancelled();
}
target.ProxyTags = new ProxyTag[] { }; target.ProxyTags = new ProxyTag[] { };