Add support for multiple proxy tags

Tangentially closes #103.
This commit is contained in:
Ske
2019-10-28 20:15:27 +01:00
committed by Astrid
parent 96b03495a4
commit 393ee16c1b
16 changed files with 190 additions and 69 deletions

View File

@@ -134,7 +134,7 @@ namespace PluralKit.Bot.Commands
25,
embedTitle,
(eb, ms) => eb.Description = string.Join("\n", ms.Select((m) => {
if (m.HasProxyTags) return $"[`{m.Hid}`] **{m.Name.SanitizeMentions()}** *({m.ProxyString.SanitizeMentions()})*";
if (m.HasProxyTags) return $"[`{m.Hid}`] **{m.Name.SanitizeMentions()}** *({m.ProxyTagsString().SanitizeMentions()})*";
return $"[`{m.Hid}`] **{m.Name.SanitizeMentions()}**";
}))
);
@@ -154,7 +154,7 @@ namespace PluralKit.Bot.Commands
var profile = $"**ID**: {m.Hid}";
if (m.Pronouns != null) profile += $"\n**Pronouns**: {m.Pronouns}";
if (m.Birthday != null) profile += $"\n**Birthdate**: {m.BirthdayString}";
if (m.Prefix != null || m.Suffix != null) profile += $"\n**Proxy tags**: {m.ProxyString}";
if (m.ProxyTags.Count > 0) profile += $"\n**Proxy tags:** {m.ProxyTagsString()}";
if (m.Description != null) profile += $"\n\n{m.Description}";
eb.AddField(m.Name, profile.Truncate(1024));
}