diff --git a/PluralKit.Bot/Commands/Groups.cs b/PluralKit.Bot/Commands/Groups.cs index 0567f1ef..cfb799fb 100644 --- a/PluralKit.Bot/Commands/Groups.cs +++ b/PluralKit.Bot/Commands/Groups.cs @@ -159,7 +159,8 @@ public class Groups + $"To clear it, type `pk;group {reference} displayname -clear`." + $"To print the raw display name, type `pk;group {reference} displayname -raw`."); - eb.Footer(new Embed.EmbedFooter($"Using {target.DisplayName.Length}/{Limits.MaxGroupNameLength} characters.")); + if (ctx.System?.Id == target.System) + eb.Footer(new Embed.EmbedFooter($"Using {target.DisplayName.Length}/{Limits.MaxGroupNameLength} characters.")); await ctx.Reply(embed: eb.Build()); } @@ -579,7 +580,7 @@ public class Groups public async Task DisplayId(Context ctx, PKGroup target) { - await ctx.Reply($"{target.Hid}"); + await ctx.Reply(target.Hid); } private async Task GetGroupSystem(Context ctx, PKGroup target) diff --git a/PluralKit.Bot/Commands/Member.cs b/PluralKit.Bot/Commands/Member.cs index 032afeef..9bc5dc47 100644 --- a/PluralKit.Bot/Commands/Member.cs +++ b/PluralKit.Bot/Commands/Member.cs @@ -143,6 +143,6 @@ public class Member public async Task DisplayId(Context ctx, PKMember target) { - await ctx.Reply($"{target.Hid}"); + await ctx.Reply(target.Hid); } } \ No newline at end of file diff --git a/PluralKit.Bot/Commands/MemberEdit.cs b/PluralKit.Bot/Commands/MemberEdit.cs index 4173b007..180ab31a 100644 --- a/PluralKit.Bot/Commands/MemberEdit.cs +++ b/PluralKit.Bot/Commands/MemberEdit.cs @@ -336,7 +336,7 @@ public class MemberEdit .Title("Member names") .Footer(new Embed.EmbedFooter( $"Member ID: {target.Hid} | Active name in bold. Server name overrides display name, which overrides base name." - + (target.DisplayName != null ? $" Using {target.DisplayName.Length}/{Limits.MaxMemberNameLength} characters for the display 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." : ""))); var showDisplayName = target.NamePrivacy.CanAccess(lcx); diff --git a/PluralKit.Bot/Commands/Random.cs b/PluralKit.Bot/Commands/Random.cs index dd898680..faaf5146 100644 --- a/PluralKit.Bot/Commands/Random.cs +++ b/PluralKit.Bot/Commands/Random.cs @@ -31,7 +31,9 @@ public class Random if (members == null || !members.Any()) throw new PKError( - "Your system has no members! Please create at least one member before using this command."); + ctx.System?.Id == target.Id ? + "Your system has no members! Please create at least one member before using this command." : + "This system has no members!"); var randInt = randGen.Next(members.Count); await ctx.Reply(embed: await _embeds.CreateMemberEmbed(target, members[randInt], ctx.Guild, @@ -53,7 +55,9 @@ public class Random if (groups == null || !groups.Any()) throw new PKError( - "Your system has no groups! Please create at least one group before using this command."); + ctx.System?.Id == target.Id ? + "Your system has no groups! Please create at least one group before using this command." : + $"This system has no groups!"); var randInt = randGen.Next(groups.Count()); await ctx.Reply(embed: await _embeds.CreateGroupEmbed(ctx, target, groups.ToArray()[randInt])); @@ -70,7 +74,8 @@ public class Random if (members == null || !members.Any()) throw new PKError( - "This group has no members! Please add at least one member to this group before using this command."); + "This group has no members!" + + ( ctx.System?.Id == group.System ? " Please add at least one member to this group before using this command." : "")); if (!ctx.MatchFlag("all", "a")) members = members.Where(g => g.MemberVisibility == PrivacyLevel.Public); diff --git a/PluralKit.Bot/Commands/System.cs b/PluralKit.Bot/Commands/System.cs index 5656a1e6..0a24b3ff 100644 --- a/PluralKit.Bot/Commands/System.cs +++ b/PluralKit.Bot/Commands/System.cs @@ -39,6 +39,6 @@ public class System if (target == null) throw Errors.NoSystemError; - await ctx.Reply($"{target.Hid}"); + await ctx.Reply(target.Hid); } } \ No newline at end of file