mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
Add server-specific system tag
This commit is contained in:
parent
28bcb35bb2
commit
9d4006b056
11 changed files with 163 additions and 7 deletions
|
|
@ -23,10 +23,18 @@ namespace PluralKit.Core
|
|||
public bool AllowAutoproxy { get; }
|
||||
public string? Color { get; }
|
||||
|
||||
public string ProxyName(MessageContext ctx) => ctx.SystemTag != null
|
||||
? $"{ServerName ?? DisplayName ?? Name} {ctx.SystemTag}"
|
||||
: ServerName ?? DisplayName ?? Name;
|
||||
public string ProxyName(MessageContext ctx)
|
||||
{
|
||||
var memberName = ServerName ?? DisplayName ?? Name;
|
||||
if (!ctx.TagEnabled)
|
||||
return memberName;
|
||||
|
||||
if (ctx.SystemGuildTag != null)
|
||||
return $"{memberName} {ctx.SystemGuildTag}";
|
||||
else if (ctx.SystemTag != null)
|
||||
return $"{memberName} {ctx.SystemTag}";
|
||||
else return memberName;
|
||||
}
|
||||
public string? ProxyAvatar(MessageContext ctx) => ServerAvatar ?? Avatar ?? ctx.SystemAvatar;
|
||||
|
||||
public ProxyMember() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue