mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 06:17:55 +00:00
fix(bot): format ids correctly in a few places
This commit is contained in:
parent
f6fceffc3f
commit
c3a30a59cd
7 changed files with 13 additions and 13 deletions
|
|
@ -240,7 +240,7 @@ public class Admin
|
|||
|
||||
var existingAccount = await ctx.Repository.GetSystemByAccount(account.Id);
|
||||
if (existingAccount != null)
|
||||
throw Errors.AccountInOtherSystem(existingAccount);
|
||||
throw Errors.AccountInOtherSystem(existingAccount, ctx.Config);
|
||||
|
||||
var system = await ctx.Repository.GetSystem(systemId.Value!);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class Member
|
|||
var existingMember = await ctx.Repository.GetMemberByName(ctx.System.Id, memberName);
|
||||
if (existingMember != null)
|
||||
{
|
||||
var msg = $"{Emojis.Warn} You already have a member in your system with the name \"{existingMember.NameFor(ctx)}\" (with ID `{existingMember.Hid}`). Do you want to create another member with the same name?";
|
||||
var msg = $"{Emojis.Warn} You already have a member in your system with the name \"{existingMember.NameFor(ctx)}\" (with ID `{existingMember.DisplayHid(ctx.Config)}`). Do you want to create another member with the same name?";
|
||||
if (!await ctx.PromptYesNo(msg, "Create")) throw new PKError("Member creation cancelled.");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ public class MemberEdit
|
|||
var eb = new EmbedBuilder()
|
||||
.Title("Member names")
|
||||
.Footer(new Embed.EmbedFooter(
|
||||
$"Member ID: {target.Hid} | Active name in bold. Server name overrides display name, which overrides base name."
|
||||
$"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." : "")));
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class SystemFront
|
|||
|
||||
var members = await ctx.Database.Execute(c => ctx.Repository.GetSwitchMembers(c, sw.Id)).ToListAsync();
|
||||
var membersStr = members.Any()
|
||||
? string.Join(", ", members.Select(m => $"**{m.NameFor(ctx)}**{(showMemberId ? $" (`{m.Hid}`)" : "")}"))
|
||||
? string.Join(", ", members.Select(m => $"**{m.NameFor(ctx)}**{(showMemberId ? $" (`{m.DisplayHid(ctx.Config)}`)" : "")}"))
|
||||
: "**no fronter**";
|
||||
|
||||
var switchSince = SystemClock.Instance.GetCurrentInstant() - sw.Timestamp;
|
||||
|
|
@ -138,13 +138,13 @@ public class SystemFront
|
|||
if (ctx.Guild != null)
|
||||
guildSettings = await ctx.Repository.GetSystemGuild(ctx.Guild.Id, system.Id);
|
||||
if (group != null)
|
||||
title.Append($"{group.NameFor(ctx)} (`{group.Hid}`)");
|
||||
title.Append($"{group.NameFor(ctx)} (`{group.DisplayHid(ctx.Config)}`)");
|
||||
else if (ctx.Guild != null && guildSettings.DisplayName != null)
|
||||
title.Append($"{guildSettings.DisplayName} (`{system.Hid}`)");
|
||||
title.Append($"{guildSettings.DisplayName} (`{system.DisplayHid(ctx.Config)}`)");
|
||||
else if (system.NameFor(ctx) != null)
|
||||
title.Append($"{system.NameFor(ctx)} (`{system.Hid}`)");
|
||||
title.Append($"{system.NameFor(ctx)} (`{system.DisplayHid(ctx.Config)}`)");
|
||||
else
|
||||
title.Append($"`{system.Hid}`");
|
||||
title.Append($"`{system.DisplayHid(ctx.Config)}`");
|
||||
|
||||
var frontpercent = await ctx.Database.Execute(c => ctx.Repository.GetFrontBreakdown(c, system.Id, group?.Id, rangeStart.Value.ToInstant(), now));
|
||||
await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, system, group, ctx.Zone,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class SystemLink
|
|||
|
||||
var existingAccount = await ctx.Repository.GetSystemByAccount(account.Id);
|
||||
if (existingAccount != null)
|
||||
throw Errors.AccountInOtherSystem(existingAccount);
|
||||
throw Errors.AccountInOtherSystem(existingAccount, ctx.Config);
|
||||
|
||||
var msg = $"{account.Mention()}, please confirm the link.";
|
||||
if (!await ctx.PromptYesNo(msg, "Confirm", account, false)) throw Errors.MemberLinkCancelled;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue