PluralKit/PluralKit.Bot/Utils/ModelUtils.cs

16 lines
485 B
C#
Raw Normal View History

using PluralKit.Core;
namespace PluralKit.Bot
{
public static class ModelUtils
{
public static string NameFor(this PKMember member, Context ctx) =>
member.NameFor(ctx.LookupContextFor(member));
2020-06-20 14:00:50 +00:00
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;
}
}