blob: b11a041b2ce5fb9296c5d73ab832d5fad2190b6f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
namespace Spacebar.Models.Generic;
[DebuggerDisplay("{User.Id} ({User.Username}#{User.Discriminator})")]
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
[SuppressMessage("ReSharper", "PropertyCanBeMadeInitOnly.Global")]
public class Member {
[JsonPropertyName("user")]
public required PartialUser User { get; set; }
[JsonPropertyName("nick")]
public string? Nick { get; set; }
[JsonPropertyName("avatar")]
public string? Avatar { get; set; }
[JsonPropertyName("avatar_decoration_data")]
public object? AvatarDecorationData { get; set; }
[JsonPropertyName("collectibles")]
public object? Collectibles { get; set; }
[JsonPropertyName("display_name_styles"), JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public DisplayNameStyle? DisplayNameStyles { get; set; }
[JsonPropertyName("banner")]
public string? Banner { get; set; }
[JsonPropertyName("bio")]
public string? Bio { get; set; }
[JsonPropertyName("roles"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
public List<long>? Roles { get; set; }
}
// Unsure if this is used anywhere outside of op14...?
public class MemberWithPresence : Member {
[JsonPropertyName("presence")]
public Presence? Presence { get; set; }
}
|