mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +00:00
Merge branch 'feature/granular-privacy'
This commit is contained in:
commit
ff7b728762
39 changed files with 692 additions and 164 deletions
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue