Remove setters for function models
This commit is contained in:
parent
761a82740f
commit
c39c51426f
@ -10,20 +10,20 @@ namespace PluralKit.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class MessageContext
|
public class MessageContext
|
||||||
{
|
{
|
||||||
public int? SystemId { get; set; }
|
public int? SystemId { get; }
|
||||||
public ulong? LogChannel { get; set; }
|
public ulong? LogChannel { get; }
|
||||||
public bool InBlacklist { get; set; }
|
public bool InBlacklist { get; }
|
||||||
public bool InLogBlacklist { get; set; }
|
public bool InLogBlacklist { get; }
|
||||||
public bool LogCleanupEnabled { get; set; }
|
public bool LogCleanupEnabled { get; }
|
||||||
public bool ProxyEnabled { get; set; }
|
public bool ProxyEnabled { get; }
|
||||||
public AutoproxyMode AutoproxyMode { get; set; }
|
public AutoproxyMode AutoproxyMode { get; }
|
||||||
public int? AutoproxyMember { get; set; }
|
public int? AutoproxyMember { get; }
|
||||||
public ulong? LastMessage { get; set; }
|
public ulong? LastMessage { get; }
|
||||||
public int? LastMessageMember { get; set; }
|
public int? LastMessageMember { get; }
|
||||||
public int LastSwitch { get; set; }
|
public int LastSwitch { get; }
|
||||||
public IReadOnlyList<int> LastSwitchMembers { get; set; } = new int[0];
|
public IReadOnlyList<int> LastSwitchMembers { get; } = new int[0];
|
||||||
public Instant LastSwitchTimestamp { get; set; }
|
public Instant LastSwitchTimestamp { get; }
|
||||||
public string? SystemTag { get; set; }
|
public string? SystemTag { get; }
|
||||||
public string? SystemAvatar { get; set; }
|
public string? SystemAvatar { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,16 +8,16 @@ namespace PluralKit.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProxyMember
|
public class ProxyMember
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; }
|
||||||
public IReadOnlyCollection<ProxyTag> ProxyTags { get; set; } = new ProxyTag[0];
|
public IReadOnlyCollection<ProxyTag> ProxyTags { get; } = new ProxyTag[0];
|
||||||
public bool KeepProxy { get; set; }
|
public bool KeepProxy { get; }
|
||||||
|
|
||||||
public string? ServerName { get; set; }
|
public string? ServerName { get; }
|
||||||
public string? DisplayName { get; set; }
|
public string? DisplayName { get; }
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; } = "";
|
||||||
|
|
||||||
public string? ServerAvatar { get; set; }
|
public string? ServerAvatar { get; }
|
||||||
public string? Avatar { get; set; }
|
public string? Avatar { get; }
|
||||||
|
|
||||||
public string ProxyName(MessageContext ctx) => ctx.SystemTag != null
|
public string ProxyName(MessageContext ctx) => ctx.SystemTag != null
|
||||||
? $"{ServerName ?? DisplayName ?? Name} {ctx.SystemTag}"
|
? $"{ServerName ?? DisplayName ?? Name} {ctx.SystemTag}"
|
||||||
|
Loading…
Reference in New Issue
Block a user