feat: show character amount for string fields

This commit is contained in:
Jake Fulmine
2022-08-27 11:25:44 +02:00
parent e23b1048c9
commit c77b2bb4fc
4 changed files with 32 additions and 22 deletions

View File

@@ -79,7 +79,7 @@ public class MemberProxy
var patch = new MemberPatch { ProxyTags = Partial<ProxyTag[]>.Present(newTags.ToArray()) };
await ctx.Repository.UpdateMember(target.Id, patch);
await ctx.Reply($"{Emojis.Success} Added proxy tags {tagToAdd.ProxyString.AsCode()}.");
await ctx.Reply($"{Emojis.Success} Added proxy tags {tagToAdd.ProxyString.AsCode()} (using {tagToAdd.ProxyString.Length}/{Limits.MaxProxyTagLength} characters).");
}
// Subcommand: "remove"
else if (ctx.Match("remove", "delete"))
@@ -121,7 +121,7 @@ public class MemberProxy
var patch = new MemberPatch { ProxyTags = Partial<ProxyTag[]>.Present(newTags) };
await ctx.Repository.UpdateMember(target.Id, patch);
await ctx.Reply($"{Emojis.Success} Member proxy tags set to {requestedTag.ProxyString.AsCode()}.");
await ctx.Reply($"{Emojis.Success} Member proxy tags set to {requestedTag.ProxyString.AsCode()} (using {requestedTag.ProxyString.Length}/{Limits.MaxProxyTagLength} characters).");
}
}
}