PluralKit/PluralKit.Bot/Utils/ModelUtils.cs
2020-06-20 16:00:50 +02:00

16 lines
485 B
C#

using PluralKit.Core;
namespace PluralKit.Bot
{
public static class ModelUtils
{
public static string NameFor(this PKMember member, Context ctx) =>
member.NameFor(ctx.LookupContextFor(member));
public static string AvatarFor(this PKMember member, Context ctx) =>
member.AvatarFor(ctx.LookupContextFor(member));
public static string DisplayName(this PKMember member) =>
member.DisplayName ?? member.Name;
}
}