Browse Source

Implement ApplicationId in Guild model

pull/1165/head
Chris Johnston 7 years ago
parent
commit
6dcc1ed14c
4 changed files with 15 additions and 1 deletions
  1. +8
    -0
      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

+ 8
- 0
src/Discord.Net.Core/Entities/Guilds/IGuild.cs View File

@@ -52,6 +52,8 @@ namespace Discord
/// The level of requirements.
/// </returns>
VerificationLevel VerificationLevel { get; }
/// <summary> Gets the level of content filtering applied to user's content in a Guild. </summary>
ExplicitContentFilterLevel ExplicitContentFilter { get; }
/// <summary>
/// Gets the ID of this guild's icon.
/// </summary>
@@ -133,12 +135,18 @@ namespace Discord
/// welcome messages are sent; <c>null</c> if none is set.
/// </returns>
ulong? SystemChannelId { get; }
<<<<<<< HEAD
/// <summary>
/// Gets the ID of the user that owns this guild.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the user that owns this guild.
/// </returns>
=======
/// <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>
>>>>>>> Implement ApplicationId in Guild model
ulong OwnerId { get; }
/// <summary>
/// Gets the ID of the region hosting this guild's voice channels.


+ 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

@@ -49,6 +49,7 @@ namespace Discord.Rest
/// <inheritdoc />
public string SplashId { get; private set; }
internal bool Available { get; private set; }
public ulong? ApplicationId { get; private set; }

/// <inheritdoc />
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
@@ -99,7 +100,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

@@ -75,6 +75,7 @@ namespace Discord.WebSocket
internal bool IsAvailable { get; private set; }
/// <summary> Indicates whether the client is connected to this guild. </summary>
public bool IsConnected { get; internal set; }
public ulong? ApplicationId { get; internal set; }

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

if (model.Emojis != null)
{


Loading…
Cancel
Save