Browse Source

Rename Live and DiscoverableDisabled to IsDiscoverableDisabled and IsLive in IStageChannel

pull/1923/head
quin lynch 3 years ago
parent
commit
18856a3d8f
3 changed files with 12 additions and 12 deletions
  1. +2
    -2
      src/Discord.Net.Core/Entities/Channels/IStageChannel.cs
  2. +5
    -5
      src/Discord.Net.Rest/Entities/Channels/RestStageChannel.cs
  3. +5
    -5
      src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs

+ 2
- 2
src/Discord.Net.Core/Entities/Channels/IStageChannel.cs View File

@@ -30,7 +30,7 @@ namespace Discord
/// <summary> /// <summary>
/// <see langword="true"/> if stage discovery is disabled, otherwise <see langword="false"/>. /// <see langword="true"/> if stage discovery is disabled, otherwise <see langword="false"/>.
/// </summary> /// </summary>
bool? DiscoverableDisabled { get; }
bool? IsDiscoverableDisabled { get; }


/// <summary> /// <summary>
/// <see langword="true"/> when the stage is live, otherwise <see langword="false"/>. /// <see langword="true"/> when the stage is live, otherwise <see langword="false"/>.
@@ -38,7 +38,7 @@ namespace Discord
/// <remarks> /// <remarks>
/// If the stage isn't live then this property will be set to <see langword="null"/>. /// If the stage isn't live then this property will be set to <see langword="null"/>.
/// </remarks> /// </remarks>
bool Live { get; }
bool IsLive { get; }


/// <summary> /// <summary>
/// Starts the stage, creating a stage instance. /// Starts the stage, creating a stage instance.


+ 5
- 5
src/Discord.Net.Rest/Entities/Channels/RestStageChannel.cs View File

@@ -20,10 +20,10 @@ namespace Discord.Rest
public StagePrivacyLevel? PrivacyLevel { get; private set; } public StagePrivacyLevel? PrivacyLevel { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool? DiscoverableDisabled { get; private set; }
public bool? IsDiscoverableDisabled { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Live { get; private set; }
public bool IsLive { get; private set; }
internal RestStageChannel(BaseDiscordClient discord, IGuild guild, ulong id) internal RestStageChannel(BaseDiscordClient discord, IGuild guild, ulong id)
: base(discord, guild, id) : base(discord, guild, id)
{ {
@@ -39,18 +39,18 @@ namespace Discord.Rest


internal void Update(StageInstance model, bool isLive = false) internal void Update(StageInstance model, bool isLive = false)
{ {
Live = isLive;
IsLive = isLive;
if(isLive) if(isLive)
{ {
Topic = model.Topic; Topic = model.Topic;
PrivacyLevel = model.PrivacyLevel; PrivacyLevel = model.PrivacyLevel;
DiscoverableDisabled = model.DiscoverableDisabled;
IsDiscoverableDisabled = model.DiscoverableDisabled;
} }
else else
{ {
Topic = null; Topic = null;
PrivacyLevel = null; PrivacyLevel = null;
DiscoverableDisabled = null;
IsDiscoverableDisabled = null;
} }
} }




+ 5
- 5
src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs View File

@@ -22,10 +22,10 @@ namespace Discord.WebSocket
public StagePrivacyLevel? PrivacyLevel { get; private set; } public StagePrivacyLevel? PrivacyLevel { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool? DiscoverableDisabled { get; private set; }
public bool? IsDiscoverableDisabled { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Live { get; private set; } = false;
public bool IsLive { get; private set; } = false;


/// <summary> /// <summary>
/// Returns <see langword="true"/> if the current user is a speaker within the stage, otherwise <see langword="false"/>. /// Returns <see langword="true"/> if the current user is a speaker within the stage, otherwise <see langword="false"/>.
@@ -62,18 +62,18 @@ namespace Discord.WebSocket


internal void Update(StageInstance model, bool isLive = false) internal void Update(StageInstance model, bool isLive = false)
{ {
Live = isLive;
IsLive = isLive;
if (isLive) if (isLive)
{ {
Topic = model.Topic; Topic = model.Topic;
PrivacyLevel = model.PrivacyLevel; PrivacyLevel = model.PrivacyLevel;
DiscoverableDisabled = model.DiscoverableDisabled;
IsDiscoverableDisabled = model.DiscoverableDisabled;
} }
else else
{ {
Topic = null; Topic = null;
PrivacyLevel = null; PrivacyLevel = null;
DiscoverableDisabled = null;
IsDiscoverableDisabled = null;
} }
} }




Loading…
Cancel
Save