Browse Source

Implement ApplicationId in Guild model

pull/1165/head
Chris Johnston 7 years ago
parent
commit
01a23279ee
4 changed files with 10 additions and 2 deletions
  1. +3
    -1
      src/Discord.Net.Core/Entities/Guilds/IGuild.cs
  2. +2
    -0
      src/Discord.Net.Rest/API/Common/Guild.cs
  3. +3
    -1
      src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
  4. +2
    -0
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs

+ 3
- 1
src/Discord.Net.Core/Entities/Guilds/IGuild.cs View File

@@ -20,7 +20,7 @@ namespace Discord
/// <summary> Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. </summary>
VerificationLevel VerificationLevel { get; }
/// <summary> Gets the level of content filtering applied to user's content in a Guild. </summary>
ExplicitContentFilterLevel ExplicitContentFilterLevel { get; }
ExplicitContentFilterLevel ExplicitContentFilter { get; }
/// <summary> Returns the id of this guild's icon, or null if one is not set. </summary>
string IconId { get; }
/// <summary> Returns the url to this guild's icon, or null if one is not set. </summary>
@@ -40,6 +40,8 @@ namespace Discord
ulong? EmbedChannelId { get; }
/// <summary> Gets the id of the channel where randomized welcome messages are sent, or null if not. </summary>
ulong? SystemChannelId { get; }
/// <summary> Gets the application id of the guild creator if it is bot-created. </summary>
ulong? ApplicationId { get; }
/// <summary> Gets the id of the user that created this guild. </summary>
ulong OwnerId { get; }
/// <summary> Gets the id of the region hosting this guild's voice channels. </summary>


+ 2
- 0
src/Discord.Net.Rest/API/Common/Guild.cs View File

@@ -41,6 +41,8 @@ namespace Discord.API
public string[] Features { get; set; }
[JsonProperty("mfa_level")]
public MfaLevel MfaLevel { get; set; }
[JsonProperty("application_id")]
public ulong? ApplicationId { get; set; }
[JsonProperty("system_channel_id")]
public ulong? SystemChannelId { get; set; }
}


+ 3
- 1
src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs View File

@@ -33,6 +33,7 @@ namespace Discord.Rest
public string IconId { get; private set; }
public string SplashId { get; private set; }
internal bool Available { get; private set; }
public ulong? ApplicationId { get; private set; }

public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);

@@ -71,7 +72,8 @@ namespace Discord.Rest
VerificationLevel = model.VerificationLevel;
MfaLevel = model.MfaLevel;
DefaultMessageNotifications = model.DefaultMessageNotifications;
ExplicitContentFilter = model.ExplicitContentFilter;
ExplicitContentFilter = model.ExplicitContentFilter;
ApplicationId = model.ApplicationId;

if (model.Emojis != null)
{


+ 2
- 0
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -45,6 +45,7 @@ namespace Discord.WebSocket
public int DownloadedMemberCount { get; private set; }
internal bool IsAvailable { get; private set; }
public bool IsConnected { get; internal set; }
public ulong? ApplicationId { get; internal set; }

internal ulong? AFKChannelId { get; private set; }
internal ulong? EmbedChannelId { get; private set; }
@@ -212,6 +213,7 @@ namespace Discord.WebSocket
MfaLevel = model.MfaLevel;
DefaultMessageNotifications = model.DefaultMessageNotifications;
ExplicitContentFilter = model.ExplicitContentFilter;
ApplicationId = model.ApplicationId;

if (model.Emojis != null)
{


Loading…
Cancel
Save