feat(bot): allow separate member avatars for proxied messages (#523)

This allows for using one avatar for the member card, and a different
avatar for proxied messages - so that users can set the main avatar to
a "full" version of their avatar, and the "proxy" avatar to a cropped
version.
This commit is contained in:
the iris system
2023-03-02 06:11:35 +13:00
committed by GitHub
parent 7fffb7f65a
commit ccb89f50e9
12 changed files with 138 additions and 49 deletions

View File

@@ -23,9 +23,9 @@ public class ProxyMember
public string Name { get; } = "";
public string? ServerAvatar { get; }
public string? WebhookAvatar { get; }
public string? Avatar { get; }
public bool AllowAutoproxy { get; }
public string? Color { get; }
@@ -42,5 +42,5 @@ public class ProxyMember
return memberName;
}
public string? ProxyAvatar(MessageContext ctx) => ServerAvatar ?? Avatar ?? ctx.SystemAvatar;
public string? ProxyAvatar(MessageContext ctx) => ServerAvatar ?? WebhookAvatar ?? Avatar ?? ctx.SystemAvatar;
}