-
-
Notifications
You must be signed in to change notification settings - Fork 299
/
DiscordGuildPreview.cs
72 lines (60 loc) · 2.43 KB
/
DiscordGuildPreview.cs
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System.Collections.Concurrent;
using System.Collections.Generic;
using DSharpPlus.Net.Serialization;
using Newtonsoft.Json;
namespace DSharpPlus.Entities;
/// <summary>
/// Represents a guild preview.
/// </summary>
public class DiscordGuildPreview : SnowflakeObject
{
/// <summary>
/// Gets the guild's name.
/// </summary>
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; internal set; }
/// <summary>
/// Gets the guild's icon.
/// </summary>
[JsonProperty("icon", NullValueHandling = NullValueHandling.Ignore)]
public string Icon { get; internal set; }
/// <summary>
/// Gets the guild's splash.
/// </summary>
[JsonProperty("splash", NullValueHandling = NullValueHandling.Ignore)]
public string Splash { get; internal set; }
/// <summary>
/// Gets the guild's discovery splash.
/// </summary>
[JsonProperty("discovery_splash", NullValueHandling = NullValueHandling.Ignore)]
public string DiscoverySplash { get; internal set; }
/// <summary>
/// Gets a collection of this guild's emojis.
/// </summary>
[JsonIgnore]
public IReadOnlyDictionary<ulong, DiscordEmoji> Emojis => new ReadOnlyConcurrentDictionary<ulong, DiscordEmoji>(this.emojis);
[JsonProperty("emojis", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(SnowflakeArrayAsDictionaryJsonConverter))]
internal ConcurrentDictionary<ulong, DiscordEmoji> emojis;
/// <summary>
/// Gets a collection of this guild's features.
/// </summary>
[JsonProperty("features", NullValueHandling = NullValueHandling.Ignore)]
public IReadOnlyList<string> Features { get; internal set; }
/// <summary>
/// Gets the approximate member count.
/// </summary>
[JsonProperty("approximate_member_count")]
public int ApproximateMemberCount { get; internal set; }
/// <summary>
/// Gets the approximate presence count.
/// </summary>
[JsonProperty("approximate_presence_count")]
public int ApproximatePresenceCount { get; internal set; }
/// <summary>
/// Gets the description for the guild, if the guild is discoverable.
/// </summary>
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; internal set; }
internal DiscordGuildPreview() { }
}