Merge branch 'feature/granular-privacy'
This commit is contained in:
16
PluralKit.Bot/Utils/ModelUtils.cs
Normal file
16
PluralKit.Bot/Utils/ModelUtils.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user