fix: apply requested changes
This commit is contained in:
parent
cd14e6409b
commit
67d5118c9c
@ -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<PKSystem> GetGroupSystem(Context ctx, PKGroup target)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -39,6 +39,6 @@ public class System
|
||||
if (target == null)
|
||||
throw Errors.NoSystemError;
|
||||
|
||||
await ctx.Reply($"{target.Hid}");
|
||||
await ctx.Reply(target.Hid);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user