fix: character count shown to non-owners of info

This commit is contained in:
rladenson 2025-01-04 04:55:10 -07:00
parent b69a64a81d
commit 127714066c
2 changed files with 12 additions and 13 deletions

View file

@ -128,8 +128,8 @@ public class MemberEdit
$"To print the description with formatting, type `{ctx.DefaultPrefix}member {target.Reference(ctx)} description -raw`."
+ (ctx.System?.Id == target.System
? $" To clear it, type `{ctx.DefaultPrefix}member {target.Reference(ctx)} description -clear`."
: "")
+ $" Using {target.Description.Length}/{Limits.MaxDescriptionLength} characters."))
+ $" Using {target.Description.Length}/{Limits.MaxDescriptionLength} characters."
: "")))
.Build());
return;
}
@ -192,8 +192,8 @@ public class MemberEdit
$"**{target.NameFor(ctx)}**'s pronouns are **{target.Pronouns}**.\nTo print the pronouns with formatting, type `{ctx.DefaultPrefix}member {target.Reference(ctx)} pronouns -raw`."
+ (ctx.System?.Id == target.System
? $" To clear them, type `{ctx.DefaultPrefix}member {target.Reference(ctx)} pronouns -clear`."
: "")
+ $" Using {target.Pronouns.Length}/{Limits.MaxPronounsLength} characters.");
+ $" Using {target.Pronouns.Length}/{Limits.MaxPronounsLength} characters."
: ""));
return;
}
@ -403,7 +403,7 @@ public class MemberEdit
.Footer(new Embed.EmbedFooter(
$"Member ID: {target.DisplayHid(ctx.Config)} | Active name in bold. Server name overrides display name, which overrides base name."
+ (target.DisplayName != null && ctx.System?.Id == target.System ? $" Using {target.DisplayName.Length}/{Limits.MaxMemberNameLength} characters for the display name." : "")
+ (memberGuildConfig?.DisplayName != null ? $" Using {memberGuildConfig?.DisplayName.Length}/{Limits.MaxMemberNameLength} characters for the server name." : "")));
+ (memberGuildConfig?.DisplayName != null && ctx.System?.Id == target.System ? $" Using {memberGuildConfig?.DisplayName.Length}/{Limits.MaxMemberNameLength} characters for the server name." : "")));
var showDisplayName = target.NamePrivacy.CanAccess(lcx);

View file

@ -64,8 +64,8 @@ public class SystemEdit
{
await ctx.Reply(
$"{(isOwnSystem ? "Your" : "This")} system's name is currently **{target.Name}**."
+ (isOwnSystem ? $" Type `{ctx.DefaultPrefix}system name -clear` to clear it." : "")
+ $" Using {target.Name.Length}/{Limits.MaxSystemNameLength} characters.");
+ (isOwnSystem ? $" Type `{ctx.DefaultPrefix}system name -clear` to clear it."
+ $" Using {target.Name.Length}/{Limits.MaxSystemNameLength} characters." : ""));
return;
}
@ -129,8 +129,8 @@ public class SystemEdit
{
await ctx.Reply(
$"{(isOwnSystem ? "Your" : "This")} system's name for this server is currently **{settings.DisplayName}**."
+ (isOwnSystem ? $" Type `{ctx.DefaultPrefix}system servername -clear` to clear it." : "")
+ $" Using {settings.DisplayName.Length}/{Limits.MaxSystemNameLength} characters.");
+ (isOwnSystem ? $" Type `{ctx.DefaultPrefix}system servername -clear` to clear it."
+ $" Using {settings.DisplayName.Length}/{Limits.MaxSystemNameLength} characters." : ""));
return;
}
@ -195,8 +195,8 @@ public class SystemEdit
.Description(target.Description)
.Footer(new Embed.EmbedFooter(
$"To print the description with formatting, type `{ctx.DefaultPrefix}s description -raw`."
+ (isOwnSystem ? $" To clear it, type `{ctx.DefaultPrefix}s description -clear`. To change it, type `{ctx.DefaultPrefix}s description <new description>`." : "")
+ $" Using {target.Description.Length}/{Limits.MaxDescriptionLength} characters."))
+ (isOwnSystem ? $" To clear it, type `{ctx.DefaultPrefix}s description -clear`. To change it, type `{ctx.DefaultPrefix}s description <new description>`."
+ $" Using {target.Description.Length}/{Limits.MaxDescriptionLength} characters." : "")))
.Build());
return;
}
@ -500,8 +500,7 @@ public class SystemEdit
{
await ctx.Reply($"{(isOwnSystem ? "Your" : "This system's")} current pronouns are **{target.Pronouns}**.\nTo print the pronouns with formatting, type `{ctx.DefaultPrefix}system pronouns -raw`."
+ (isOwnSystem ? $" To clear them, type `{ctx.DefaultPrefix}system pronouns -clear`."
: "")
+ $" Using {target.Pronouns.Length}/{Limits.MaxPronounsLength} characters.");
+ $" Using {target.Pronouns.Length}/{Limits.MaxPronounsLength} characters." : ""));
return;
}