Browse Source

Refactor summaries and boolean property names

pull/1923/head
quin lynch 3 years ago
parent
commit
06eefa790c
19 changed files with 175 additions and 189 deletions
  1. +54
    -61
      src/Discord.Net.Core/Discord.Net.Core.xml
  2. +5
    -7
      src/Discord.Net.Core/Entities/Channels/IStageChannel.cs
  3. +9
    -9
      src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs
  4. +4
    -4
      src/Discord.Net.Core/Entities/Guilds/IGuild.cs
  5. +7
    -7
      src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs
  6. +8
    -8
      src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs
  7. +1
    -1
      src/Discord.Net.Core/Entities/Interactions/Message Components/ActionRowComponent.cs
  8. +10
    -12
      src/Discord.Net.Core/Entities/Interactions/Message Components/ButtonComponent.cs
  9. +33
    -34
      src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs
  10. +1
    -1
      src/Discord.Net.Core/Entities/Interactions/Message Components/MessageComponent.cs
  11. +9
    -11
      src/Discord.Net.Core/Entities/Interactions/Message Components/SelectMenuComponent.cs
  12. +1
    -1
      src/Discord.Net.Rest/API/Common/ButtonComponent.cs
  13. +1
    -1
      src/Discord.Net.Rest/API/Common/SelectMenuComponent.cs
  14. +5
    -5
      src/Discord.Net.Rest/Discord.Net.Rest.xml
  15. +5
    -5
      src/Discord.Net.Rest/Entities/Channels/RestStageChannel.cs
  16. +6
    -6
      src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs
  17. +5
    -5
      src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml
  18. +5
    -5
      src/Discord.Net.WebSocket/Entities/Channels/SocketStageChannel.cs
  19. +6
    -6
      src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs

+ 54
- 61
src/Discord.Net.Core/Discord.Net.Core.xml View File

@@ -1988,23 +1988,21 @@
<member name="P:Discord.IStageChannel.PrivacyLevel">
<summary>
The <see cref="T:Discord.StagePrivacyLevel"/> of the current stage.
Gets the <see cref="T:Discord.StagePrivacyLevel"/> of the current stage.
</summary>
<remarks>
If the stage isn't live then this property will be set to <see langword="null"/>.
</remarks>
</member>
<member name="P:Discord.IStageChannel.DiscoverableDisabled">
<member name="P:Discord.IStageChannel.IsDiscoverableDisabled">
<summary>
<see langword="true"/> if stage discovery is disabled, otherwise <see langword="false"/>.
Gets whether or not stage discovery is disabled.
</summary>
</member>
<member name="P:Discord.IStageChannel.Live">
<member name="P:Discord.IStageChannel.IsLive">
<summary>
<see langword="true"/> when the stage is live, otherwise <see langword="false"/>.
Gets whether or not the stage is live.
</summary>
<remarks>
If the stage isn't live then this property will be set to <see langword="null"/>.
</remarks>
</member>
<member name="M:Discord.IStageChannel.StartStageAsync(System.String,Discord.StagePrivacyLevel,Discord.RequestOptions)">
<summary>
@@ -2238,39 +2236,39 @@
Gets the type of the current thread channel.
</summary>
</member>
<member name="P:Discord.IThreadChannel.Joined">
<member name="P:Discord.IThreadChannel.HasJoined">
<summary>
<see langword="true"/> if the current user has joined this thread, otherwise <see langword="false"/>.
Gets whether or not the current user has joined this thread.
</summary>
</member>
<member name="P:Discord.IThreadChannel.Archived">
<member name="P:Discord.IThreadChannel.IsArchived">
<summary>
<see langword="true"/> if the current thread is archived, otherwise <see langword="false"/>.
</summary>
</member>
<member name="P:Discord.IThreadChannel.AutoArchiveDuration">
<summary>
Duration to automatically archive the thread after recent activity.
Gets whether or not the current thread is archived.
</summary>
</member>
<member name="P:Discord.IThreadChannel.ArchiveTimestamp">
<summary>
Timestamp when the thread's archive status was last changed, used for calculating recent activity.
Gets the timestamp when the thread's archive status was last changed, used for calculating recent activity.
</summary>
</member>
<member name="P:Discord.IThreadChannel.Locked">
<member name="P:Discord.IThreadChannel.IsLocked">
<summary>
<see langword="true"/> if the current thread is locked, otherwise <see langword="false"/>
Gets whether or not the current thread is locked.
</summary>
</member>
<member name="P:Discord.IThreadChannel.MemberCount">
<summary>
An approximate count of users in a thread, stops counting at 50.
Gets an approximate count of users in a thread, stops counting after 50.
</summary>
</member>
<member name="P:Discord.IThreadChannel.MessageCount">
<summary>
An approximate count of messages in a thread, stops counting at 50.
Gets an approximate count of messages in a thread, stops counting after 50.
</summary>
</member>
<member name="M:Discord.IThreadChannel.JoinAsync(Discord.RequestOptions)">
@@ -3537,7 +3535,7 @@
</member>
<member name="M:Discord.IGuild.GetStageChannelAsync(System.UInt64,Discord.CacheMode,Discord.RequestOptions)">
<summary>
Gets a stage channel in this guild
Gets a stage channel in this guild.
</summary>
<param name="id">The snowflake identifier for the stage channel.</param>
<param name="mode">The <see cref="T:Discord.CacheMode"/> that determines whether the object should be fetched from cache.</param>
@@ -3782,7 +3780,7 @@
</member>
<member name="M:Discord.IGuild.DisconnectAsync(Discord.IGuildUser)">
<summary>
Disconnects the user from its current voice channel
Disconnects the user from its current voice channel.
</summary>
<param name="user">The user to disconnect.</param>
<returns>A task that represents the asynchronous operation for disconnecting a user.</returns>
@@ -4009,7 +4007,7 @@
</member>
<member name="M:Discord.IGuild.CreateStickerAsync(System.String,System.String,System.Collections.Generic.IEnumerable{System.String},System.String,Discord.RequestOptions)">
<summary>
Creates a new sticker in this guild
Creates a new sticker in this guild.
</summary>
<param name="name">The name of the sticker.</param>
<param name="description">The description of the sticker.</param>
@@ -4022,7 +4020,7 @@
</member>
<member name="M:Discord.IGuild.CreateStickerAsync(System.String,System.String,System.Collections.Generic.IEnumerable{System.String},System.IO.Stream,System.String,Discord.RequestOptions)">
<summary>
Creates a new sticker in this guild
Creates a new sticker in this guild.
</summary>
<param name="name">The name of the sticker.</param>
<param name="description">The description of the sticker.</param>
@@ -4766,12 +4764,12 @@
</member>
<member name="P:Discord.MessageCommandBuilder.Name">
<summary>
The name of this Message command.
Gets or sets the name of this Message command.
</summary>
</member>
<member name="P:Discord.MessageCommandBuilder.DefaultPermission">
<member name="P:Discord.MessageCommandBuilder.IsDefaultPermission">
<summary>
Whether the command is enabled by default when the app is added to a guild
Gets or sets whether the command is enabled by default when the app is added to a guild
</summary>
</member>
<member name="M:Discord.MessageCommandBuilder.Build">
@@ -4795,7 +4793,7 @@
<summary>
Sets the default permission of the current command.
</summary>
<param name="value">The default permission value to set.</param>
<param name="isDefaultPermission">The default permission value to set.</param>
<returns>The current builder.</returns>
</member>
<member name="T:Discord.MessageCommandProperties">
@@ -4810,17 +4808,17 @@
</member>
<member name="F:Discord.UserCommandBuilder.MaxNameLength">
<summary>
Returns the maximum length a commands name allowed by Discord
Returns the maximum length a commands name allowed by Discord.
</summary>
</member>
<member name="P:Discord.UserCommandBuilder.Name">
<summary>
The name of this User command.
Gets or sets the name of this User command.
</summary>
</member>
<member name="P:Discord.UserCommandBuilder.DefaultPermission">
<member name="P:Discord.UserCommandBuilder.IsDefaultPermission">
<summary>
Whether the command is enabled by default when the app is added to a guild
Gets or sets whether the command is enabled by default when the app is added to a guild.
</summary>
</member>
<member name="M:Discord.UserCommandBuilder.Build">
@@ -4842,7 +4840,7 @@
<summary>
Sets the default permission of the current command.
</summary>
<param name="value">The default permission value to set.</param>
<param name="isDefaultPermission">The default permission value to set.</param>
<returns>The current builder.</returns>
</member>
<member name="T:Discord.UserCommandProperties">
@@ -5191,7 +5189,7 @@
</member>
<member name="P:Discord.ActionRowComponent.Components">
<summary>
The child components in this row.
Gets the child components in this row.
</summary>
</member>
<member name="T:Discord.ButtonComponent">
@@ -5204,35 +5202,33 @@
</member>
<member name="P:Discord.ButtonComponent.Style">
<summary>
The <see cref="T:Discord.ButtonStyle"/> of this button, example buttons with each style can be found <see href="https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png">Here</see>.
Gets the <see cref="T:Discord.ButtonStyle"/> of this button, example buttons with each style can be found <see href="https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png">Here</see>.
</summary>
</member>
<member name="P:Discord.ButtonComponent.Label">
<summary>
The label of the button, this is the text that is shown.
Gets the label of the button, this is the text that is shown.
</summary>
</member>
<member name="P:Discord.ButtonComponent.Emote">
<summary>
A <see cref="T:Discord.IEmote"/> that will be displayed with this button.
Gets the <see cref="T:Discord.IEmote"/> displayed with this button.
</summary>
</member>
<member name="P:Discord.ButtonComponent.CustomId">
<summary>
A unique id that will be sent with a <see cref="T:Discord.IDiscordInteraction"/>. This is how you know what button was pressed.
</summary>
<inheritdoc/>
</member>
<member name="P:Discord.ButtonComponent.Url">
<summary>
A URL for a <see cref="F:Discord.ButtonStyle.Link"/> button.
Gets the URL for a <see cref="F:Discord.ButtonStyle.Link"/> button.
</summary>
<remarks>
You cannot have a button with a <b>URL</b> and a <b>CustomId</b>.
</remarks>
</member>
<member name="P:Discord.ButtonComponent.Disabled">
<member name="P:Discord.ButtonComponent.IsDisabled">
<summary>
Whether this button is disabled or not.
Gets whether this button is disabled or not.
</summary>
</member>
<member name="M:Discord.ButtonComponent.ToBuilder">
@@ -5309,12 +5305,11 @@
<param name="components">The components to create the builder from.</param>
<returns>The newly created builder.</returns>
</member>
<member name="M:Discord.ComponentBuilder.WithSelectMenu(System.String,System.String,System.Collections.Generic.List{Discord.SelectMenuOptionBuilder},System.String,System.Int32,System.Int32,System.Boolean,System.Int32)">
<member name="M:Discord.ComponentBuilder.WithSelectMenu(System.String,System.Collections.Generic.List{Discord.SelectMenuOptionBuilder},System.String,System.Int32,System.Int32,System.Boolean,System.Int32)">
<summary>
Adds a <see cref="T:Discord.SelectMenuBuilder"/> to the <see cref="T:Discord.ComponentBuilder"/> at the specific row.
If the row cannot accept the component then it will add it to a row that can.
</summary>
<param name="label">The label of the menu.</param>
<param name="customId">The custom id of the menu.</param>
<param name="options">The options of the menu.</param>
<param name="placeholder">The placeholder of the menu.</param>
@@ -5444,7 +5439,7 @@
Gets or sets the url of the current button.
</summary>
</member>
<member name="P:Discord.ButtonBuilder.Disabled">
<member name="P:Discord.ButtonBuilder.IsDisabled">
<summary>
Gets or sets whether the current button is disabled.
</summary>
@@ -5463,7 +5458,7 @@
<param name="customId">The custom ID of this button.</param>
<param name="style">The custom ID of this button.</param>
<param name="emote">The emote of this button.</param>
<param name="disabled">Disabled this button or not.</param>
<param name="isDisabled">Disabled this button or not.</param>
</member>
<member name="M:Discord.ButtonBuilder.#ctor(Discord.ButtonComponent)">
<summary>
@@ -5556,7 +5551,7 @@
<summary>
Sets whether the current button is disabled.
</summary>
<param name="disabled">Whether the current button is disabled or not.</param>
<param name="isDisabled">Whether the current button is disabled or not.</param>
<returns>The current builder.</returns>
</member>
<member name="M:Discord.ButtonBuilder.Build">
@@ -5623,7 +5618,7 @@
<exception cref="T:System.ArgumentException" accessor="set"><see cref="P:Discord.SelectMenuBuilder.Options"/> count exceeds <see cref="F:Discord.SelectMenuBuilder.MaxOptionCount"/>.</exception>
<exception cref="T:System.ArgumentNullException" accessor="set"><see cref="P:Discord.SelectMenuBuilder.Options"/> is null.</exception>
</member>
<member name="P:Discord.SelectMenuBuilder.Disabled">
<member name="P:Discord.SelectMenuBuilder.IsDisabled">
<summary>
Gets or sets whether the current menu is disabled.
</summary>
@@ -5647,7 +5642,7 @@
<param name="placeholder">The placeholder of this select menu.</param>
<param name="maxValues">The max values of this select menu.</param>
<param name="minValues">The min values of this select menu.</param>
<param name="disabled">Disabled this select menu or not.</param>
<param name="isDisabled">Disabled this select menu or not.</param>
</member>
<member name="M:Discord.SelectMenuBuilder.WithCustomId(System.String)">
<summary>
@@ -5717,7 +5712,7 @@
<param name="value">The value of this option.</param>
<param name="description">The description of this option.</param>
<param name="emote">The emote of this option.</param>
<param name="default">Render this option as selected by default or not.</param>
<param name="isDefault">Render this option as selected by default or not.</param>
<exception cref="T:System.InvalidOperationException">Options count reached <see cref="F:Discord.SelectMenuBuilder.MaxOptionCount"/>.</exception>
<returns>
The current builder.
@@ -5727,7 +5722,7 @@
<summary>
Sets whether the current menu is disabled.
</summary>
<param name="disabled">Whether the current menu is disabled or not.</param>
<param name="isDisabled">Whether the current menu is disabled or not.</param>
<returns>
The current builder.
</returns>
@@ -5784,7 +5779,7 @@
Gets or sets the emote of this option.
</summary>
</member>
<member name="P:Discord.SelectMenuOptionBuilder.Default">
<member name="P:Discord.SelectMenuOptionBuilder.IsDefault">
<summary>
Gets or sets the whether or not this option will render selected by default.
</summary>
@@ -5802,7 +5797,7 @@
<param name="value">The value of this option.</param>
<param name="description">The description of this option.</param>
<param name="emote">The emote of this option.</param>
<param name="default">Render this option as selected by default or not.</param>
<param name="isDefault">Render this option as selected by default or not.</param>
</member>
<member name="M:Discord.SelectMenuOptionBuilder.#ctor(Discord.SelectMenuOption)">
<summary>
@@ -5852,7 +5847,7 @@
<summary>
Sets the field default.
</summary>
<param name="defaultValue">The value to set the field default to.</param>
<param name="isDefault">The value to set the field default to.</param>
<returns>
The current builder.
</returns>
@@ -5905,7 +5900,7 @@
</member>
<member name="P:Discord.MessageComponent.Components">
<summary>
The components to be used in a message.
Gets the components to be used in a message.
</summary>
</member>
<member name="P:Discord.MessageComponent.Empty">
@@ -5922,33 +5917,31 @@
<inheritdoc/>
</member>
<member name="P:Discord.SelectMenuComponent.CustomId">
<summary>
The custom id of this Select menu that will be sent with a <see cref="T:Discord.IDiscordInteraction"/>.
</summary>
<inheritdoc/>
</member>
<member name="P:Discord.SelectMenuComponent.Options">
<summary>
The menus options to select from.
Gets the menus options to select from.
</summary>
</member>
<member name="P:Discord.SelectMenuComponent.Placeholder">
<summary>
A custom placeholder text if nothing is selected, max 100 characters.
Gets the custom placeholder text if nothing is selected.
</summary>
</member>
<member name="P:Discord.SelectMenuComponent.MinValues">
<summary>
The minimum number of items that must be chosen; default 1, min 0, max 25
Gets the minimum number of items that must be chosen.
</summary>
</member>
<member name="P:Discord.SelectMenuComponent.MaxValues">
<summary>
The maximum number of items that can be chosen; default 1, max 25
Gets the maximum number of items that can be chosen.
</summary>
</member>
<member name="P:Discord.SelectMenuComponent.Disabled">
<member name="P:Discord.SelectMenuComponent.IsDisabled">
<summary>
Whether this menu is disabled or not.
Gets whether this menu is disabled or not.
</summary>
</member>
<member name="M:Discord.SelectMenuComponent.ToBuilder">


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

@@ -21,6 +21,7 @@ namespace Discord

/// <summary>
/// The <see cref="StagePrivacyLevel"/> of the current stage.
/// Gets the <see cref="StagePrivacyLevel"/> of the current stage.
/// </summary>
/// <remarks>
/// If the stage isn't live then this property will be set to <see langword="null"/>.
@@ -28,17 +29,14 @@ namespace Discord
StagePrivacyLevel? PrivacyLevel { get; }

/// <summary>
/// <see langword="true"/> if stage discovery is disabled, otherwise <see langword="false"/>.
/// Gets whether or not stage discovery is disabled.
/// </summary>
bool? DiscoverableDisabled { get; }
bool? IsDiscoverableDisabled { get; }

/// <summary>
/// <see langword="true"/> when the stage is live, otherwise <see langword="false"/>.
/// Gets whether or not the stage is live.
/// </summary>
/// <remarks>
/// If the stage isn't live then this property will be set to <see langword="null"/>.
/// </remarks>
bool Live { get; }
bool IsLive { get; }

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


+ 9
- 9
src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs View File

@@ -17,37 +17,37 @@ namespace Discord
ThreadType Type { get; }

/// <summary>
/// <see langword="true"/> if the current user has joined this thread, otherwise <see langword="false"/>.
/// Gets whether or not the current user has joined this thread.
/// </summary>
bool Joined { get; }
bool HasJoined { get; }

/// <summary>
/// <see langword="true"/> if the current thread is archived, otherwise <see langword="false"/>.
/// </summary>
bool Archived { get; }
bool IsArchived { get; }

/// <summary>
/// Duration to automatically archive the thread after recent activity.
/// Gets whether or not the current thread is archived.
/// </summary>
ThreadArchiveDuration AutoArchiveDuration { get; }

/// <summary>
/// Timestamp when the thread's archive status was last changed, used for calculating recent activity.
/// Gets the timestamp when the thread's archive status was last changed, used for calculating recent activity.
/// </summary>
DateTimeOffset ArchiveTimestamp { get; }

/// <summary>
/// <see langword="true"/> if the current thread is locked, otherwise <see langword="false"/>
/// Gets whether or not the current thread is locked.
/// </summary>
bool Locked { get; }
bool IsLocked { get; }

/// <summary>
/// An approximate count of users in a thread, stops counting at 50.
/// Gets an approximate count of users in a thread, stops counting after 50.
/// </summary>
int MemberCount { get; }

/// <summary>
/// An approximate count of messages in a thread, stops counting at 50.
/// Gets an approximate count of messages in a thread, stops counting after 50.
/// </summary>
int MessageCount { get; }



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

@@ -538,7 +538,7 @@ namespace Discord
/// </returns>
Task<IVoiceChannel> GetVoiceChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
/// Gets a stage channel in this guild
/// Gets a stage channel in this guild.
/// </summary>
/// <param name="id">The snowflake identifier for the stage channel.</param>
/// <param name="mode">The <see cref="CacheMode"/> that determines whether the object should be fetched from cache.</param>
@@ -771,7 +771,7 @@ namespace Discord
/// <returns>A guild user associated with the specified <paramref name="userId" />; <see langword="null" /> if the user is already in the guild.</returns>
Task<IGuildUser> AddGuildUserAsync(ulong userId, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null);
/// <summary>
/// Disconnects the user from its current voice channel
/// Disconnects the user from its current voice channel.
/// </summary>
/// <param name="user">The user to disconnect.</param>
/// <returns>A task that represents the asynchronous operation for disconnecting a user.</returns>
@@ -990,7 +990,7 @@ namespace Discord
Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, Image image, RequestOptions options = null);

/// <summary>
/// Creates a new sticker in this guild
/// Creates a new sticker in this guild.
/// </summary>
/// <param name="name">The name of the sticker.</param>
/// <param name="description">The description of the sticker.</param>
@@ -1003,7 +1003,7 @@ namespace Discord
Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, string path, RequestOptions options = null);

/// <summary>
/// Creates a new sticker in this guild
/// Creates a new sticker in this guild.
/// </summary>
/// <param name="name">The name of the sticker.</param>
/// <param name="description">The description of the sticker.</param>


+ 7
- 7
src/Discord.Net.Core/Entities/Interactions/Context Menus/MessageCommandBuilder.cs View File

@@ -18,7 +18,7 @@ namespace Discord
public const int MaxNameLength = 32;

/// <summary>
/// The name of this Message command.
/// Gets or sets the name of this Message command.
/// </summary>
public string Name
{
@@ -37,9 +37,9 @@ namespace Discord
}

/// <summary>
/// Whether the command is enabled by default when the app is added to a guild
/// Gets or sets whether the command is enabled by default when the app is added to a guild
/// </summary>
public bool DefaultPermission { get; set; } = true;
public bool IsDefaultPermission { get; set; } = true;

private string _name { get; set; }

@@ -54,7 +54,7 @@ namespace Discord
MessageCommandProperties props = new MessageCommandProperties()
{
Name = Name,
DefaultPermission = DefaultPermission
DefaultPermission = IsDefaultPermission
};

return props;
@@ -77,11 +77,11 @@ namespace Discord
/// <summary>
/// Sets the default permission of the current command.
/// </summary>
/// <param name="value">The default permission value to set.</param>
/// <param name="isDefaultPermission">The default permission value to set.</param>
/// <returns>The current builder.</returns>
public MessageCommandBuilder WithDefaultPermission (bool value)
public MessageCommandBuilder WithDefaultPermission (bool isDefaultPermission)
{
DefaultPermission = value;
IsDefaultPermission = isDefaultPermission;
return this;
}
}


+ 8
- 8
src/Discord.Net.Core/Entities/Interactions/Context Menus/UserCommandBuilder.cs View File

@@ -13,12 +13,12 @@ namespace Discord
public class UserCommandBuilder
{
/// <summary>
/// Returns the maximum length a commands name allowed by Discord
/// Returns the maximum length a commands name allowed by Discord.
/// </summary>
public const int MaxNameLength = 32;

/// <summary>
/// The name of this User command.
/// Gets or sets the name of this User command.
/// </summary>
public string Name
{
@@ -37,9 +37,9 @@ namespace Discord
}

/// <summary>
/// Whether the command is enabled by default when the app is added to a guild
/// Gets or sets whether the command is enabled by default when the app is added to a guild.
/// </summary>
public bool DefaultPermission { get; set; } = true;
public bool IsDefaultPermission { get; set; } = true;

private string _name { get; set; }

@@ -52,7 +52,7 @@ namespace Discord
UserCommandProperties props = new UserCommandProperties()
{
Name = Name,
DefaultPermission = DefaultPermission
DefaultPermission = IsDefaultPermission
};

return props;
@@ -75,11 +75,11 @@ namespace Discord
/// <summary>
/// Sets the default permission of the current command.
/// </summary>
/// <param name="value">The default permission value to set.</param>
/// <param name="isDefaultPermission">The default permission value to set.</param>
/// <returns>The current builder.</returns>
public UserCommandBuilder WithDefaultPermission (bool value)
public UserCommandBuilder WithDefaultPermission (bool isDefaultPermission)
{
DefaultPermission = value;
IsDefaultPermission = isDefaultPermission;
return this;
}
}


+ 1
- 1
src/Discord.Net.Core/Entities/Interactions/Message Components/ActionRowComponent.cs View File

@@ -16,7 +16,7 @@ namespace Discord
public ComponentType Type { get; } = ComponentType.ActionRow;

/// <summary>
/// The child components in this row.
/// Gets the child components in this row.
/// </summary>
public IReadOnlyCollection<IMessageComponent> Components { get; internal set; }



+ 10
- 12
src/Discord.Net.Core/Entities/Interactions/Message Components/ButtonComponent.cs View File

@@ -16,27 +16,25 @@ namespace Discord
public ComponentType Type { get; } = ComponentType.Button;

/// <summary>
/// The <see cref="ButtonStyle"/> of this button, example buttons with each style can be found <see href="https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png">Here</see>.
/// Gets the <see cref="ButtonStyle"/> of this button, example buttons with each style can be found <see href="https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png">Here</see>.
/// </summary>
public ButtonStyle Style { get; }

/// <summary>
/// The label of the button, this is the text that is shown.
/// Gets the label of the button, this is the text that is shown.
/// </summary>
public string Label { get; }

/// <summary>
/// A <see cref="IEmote"/> that will be displayed with this button.
/// Gets the <see cref="IEmote"/> displayed with this button.
/// </summary>
public IEmote Emote { get; }

/// <summary>
/// A unique id that will be sent with a <see cref="IDiscordInteraction"/>. This is how you know what button was pressed.
/// </summary>
/// <inheritdoc/>
public string CustomId { get; }

/// <summary>
/// A URL for a <see cref="ButtonStyle.Link"/> button.
/// Gets the URL for a <see cref="ButtonStyle.Link"/> button.
/// </summary>
/// <remarks>
/// You cannot have a button with a <b>URL</b> and a <b>CustomId</b>.
@@ -44,9 +42,9 @@ namespace Discord
public string Url { get; }

/// <summary>
/// Whether this button is disabled or not.
/// Gets whether this button is disabled or not.
/// </summary>
public bool Disabled { get; }
public bool IsDisabled { get; }

/// <summary>
/// Turns this button into a button builder.
@@ -55,16 +53,16 @@ namespace Discord
/// A newly created button builder with the same properties as this button.
/// </returns>
public ButtonBuilder ToBuilder()
=> new ButtonBuilder(Label, CustomId, Style, Url, Emote, Disabled);
=> new ButtonBuilder(Label, CustomId, Style, Url, Emote, IsDisabled);

internal ButtonComponent(ButtonStyle style, string label, IEmote emote, string customId, string url, bool disabled)
internal ButtonComponent(ButtonStyle style, string label, IEmote emote, string customId, string url, bool isDisabled)
{
Style = style;
Label = label;
Emote = emote;
CustomId = customId;
Url = url;
Disabled = disabled;
IsDisabled = isDisabled;
}
}
}

+ 33
- 34
src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs View File

@@ -69,14 +69,14 @@ namespace Discord
switch (component)
{
case ButtonComponent button:
WithButton(button.Label, button.CustomId, button.Style, button.Emote, button.Url, button.Disabled, row);
WithButton(button.Label, button.CustomId, button.Style, button.Emote, button.Url, button.IsDisabled, row);
break;
case ActionRowComponent actionRow:
foreach (var cmp in actionRow.Components)
AddComponent(cmp, row);
break;
case SelectMenuComponent menu:
WithSelectMenu(menu.Placeholder, menu.CustomId, menu.Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.Disabled, row);
WithSelectMenu(menu.CustomId, menu.Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.IsDisabled, row);
break;
}
}
@@ -85,7 +85,6 @@ namespace Discord
/// Adds a <see cref="SelectMenuBuilder"/> to the <see cref="ComponentBuilder"/> at the specific row.
/// If the row cannot accept the component then it will add it to a row that can.
/// </summary>
/// <param name="label">The label of the menu.</param>
/// <param name="customId">The custom id of the menu.</param>
/// <param name="options">The options of the menu.</param>
/// <param name="placeholder">The placeholder of the menu.</param>
@@ -94,7 +93,7 @@ namespace Discord
/// <param name="disabled">Whether or not the menu is disabled.</param>
/// <param name="row">The row to add the menu to.</param>
/// <returns></returns>
public ComponentBuilder WithSelectMenu(string label, string customId, List<SelectMenuOptionBuilder> options,
public ComponentBuilder WithSelectMenu(string customId, List<SelectMenuOptionBuilder> options,
string placeholder = null, int minValues = 1, int maxValues = 1, bool disabled = false, int row = 0)
{
return WithSelectMenu(new SelectMenuBuilder()
@@ -413,7 +412,7 @@ namespace Discord
/// <summary>
/// Gets or sets whether the current button is disabled.
/// </summary>
public bool Disabled { get; set; }
public bool IsDisabled { get; set; }


private string _label;
@@ -432,14 +431,14 @@ namespace Discord
/// <param name="customId">The custom ID of this button.</param>
/// <param name="style">The custom ID of this button.</param>
/// <param name="emote">The emote of this button.</param>
/// <param name="disabled">Disabled this button or not.</param>
public ButtonBuilder(string label = null, string customId = null, ButtonStyle style = ButtonStyle.Primary, string url = null, IEmote emote = null, bool disabled = false)
/// <param name="isDisabled">Disabled this button or not.</param>
public ButtonBuilder(string label = null, string customId = null, ButtonStyle style = ButtonStyle.Primary, string url = null, IEmote emote = null, bool isDisabled = false)
{
CustomId = customId;
Style = style;
Url = url;
Label = label;
Disabled = disabled;
IsDisabled = isDisabled;
Emote = emote;
}

@@ -452,7 +451,7 @@ namespace Discord
Style = button.Style;
Url = button.Url;
Label = button.Label;
Disabled = button.Disabled;
IsDisabled = button.IsDisabled;
Emote = button.Emote;
}

@@ -566,11 +565,11 @@ namespace Discord
/// <summary>
/// Sets whether the current button is disabled.
/// </summary>
/// <param name="disabled">Whether the current button is disabled or not.</param>
/// <param name="isDisabled">Whether the current button is disabled or not.</param>
/// <returns>The current builder.</returns>
public ButtonBuilder WithDisabled(bool disabled)
public ButtonBuilder WithDisabled(bool isDisabled)
{
Disabled = disabled;
IsDisabled = isDisabled;
return this;
}

@@ -601,7 +600,7 @@ namespace Discord
else if (string.IsNullOrEmpty(CustomId))
throw new InvalidOperationException("Non-link buttons must have a custom id associated with them");

return new ButtonComponent(Style, Label, Emote, CustomId, Url, Disabled);
return new ButtonComponent(Style, Label, Emote, CustomId, Url, IsDisabled);
}
}

@@ -718,7 +717,7 @@ namespace Discord
/// <summary>
/// Gets or sets whether the current menu is disabled.
/// </summary>
public bool Disabled { get; set; }
public bool IsDisabled { get; set; }

private List<SelectMenuOptionBuilder> _options = new List<SelectMenuOptionBuilder>();
private int _minValues = 1;
@@ -740,7 +739,7 @@ namespace Discord
CustomId = selectMenu.Placeholder;
MaxValues = selectMenu.MaxValues;
MinValues = selectMenu.MinValues;
Disabled = selectMenu.Disabled;
IsDisabled = selectMenu.IsDisabled;
Options = selectMenu.Options?
.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default))
.ToList();
@@ -754,13 +753,13 @@ namespace Discord
/// <param name="placeholder">The placeholder of this select menu.</param>
/// <param name="maxValues">The max values of this select menu.</param>
/// <param name="minValues">The min values of this select menu.</param>
/// <param name="disabled">Disabled this select menu or not.</param>
public SelectMenuBuilder(string customId, List<SelectMenuOptionBuilder> options, string placeholder = null, int maxValues = 1, int minValues = 1, bool disabled = false)
/// <param name="isDisabled">Disabled this select menu or not.</param>
public SelectMenuBuilder(string customId, List<SelectMenuOptionBuilder> options, string placeholder = null, int maxValues = 1, int minValues = 1, bool isDisabled = false)
{
CustomId = customId;
Options = options;
Placeholder = placeholder;
Disabled = disabled;
IsDisabled = isDisabled;
MaxValues = maxValues;
MinValues = minValues;
}
@@ -859,27 +858,27 @@ namespace Discord
/// <param name="value">The value of this option.</param>
/// <param name="description">The description of this option.</param>
/// <param name="emote">The emote of this option.</param>
/// <param name="default">Render this option as selected by default or not.</param>
/// <param name="isDefault">Render this option as selected by default or not.</param>
/// <exception cref="InvalidOperationException">Options count reached <see cref="MaxOptionCount"/>.</exception>
/// <returns>
/// The current builder.
/// </returns>
public SelectMenuBuilder AddOption(string label, string value, string description = null, IEmote emote = null, bool? @default = null)
public SelectMenuBuilder AddOption(string label, string value, string description = null, IEmote emote = null, bool? isDefault = null)
{
AddOption(new SelectMenuOptionBuilder(label, value, description, emote, @default));
AddOption(new SelectMenuOptionBuilder(label, value, description, emote, isDefault));
return this;
}

/// <summary>
/// Sets whether the current menu is disabled.
/// </summary>
/// <param name="disabled">Whether the current menu is disabled or not.</param>
/// <param name="isDisabled">Whether the current menu is disabled or not.</param>
/// <returns>
/// The current builder.
/// </returns>
public SelectMenuBuilder WithDisabled(bool disabled)
public SelectMenuBuilder WithDisabled(bool isDisabled)
{
Disabled = disabled;
IsDisabled = isDisabled;
return this;
}

@@ -891,7 +890,7 @@ namespace Discord
{
var options = Options?.Select(x => x.Build()).ToList();

return new SelectMenuComponent(CustomId, options, Placeholder, MinValues, MaxValues, Disabled);
return new SelectMenuComponent(CustomId, options, Placeholder, MinValues, MaxValues, IsDisabled);
}
}

@@ -991,7 +990,7 @@ namespace Discord
/// <summary>
/// Gets or sets the whether or not this option will render selected by default.
/// </summary>
public bool? Default { get; set; }
public bool? IsDefault { get; set; }

private string _label;
private string _value;
@@ -1009,14 +1008,14 @@ namespace Discord
/// <param name="value">The value of this option.</param>
/// <param name="description">The description of this option.</param>
/// <param name="emote">The emote of this option.</param>
/// <param name="default">Render this option as selected by default or not.</param>
public SelectMenuOptionBuilder(string label, string value, string description = null, IEmote emote = null, bool? @default = null)
/// <param name="isDefault">Render this option as selected by default or not.</param>
public SelectMenuOptionBuilder(string label, string value, string description = null, IEmote emote = null, bool? isDefault = null)
{
Label = label;
Value = value;
Description = description;
Emote = emote;
Default = @default;
this.IsDefault = isDefault;
}

/// <summary>
@@ -1028,7 +1027,7 @@ namespace Discord
Value = option.Value;
Description = option.Description;
Emote = option.Emote;
Default = option.Default;
IsDefault = option.Default;
}

/// <summary>
@@ -1089,13 +1088,13 @@ namespace Discord
/// <summary>
/// Sets the field default.
/// </summary>
/// <param name="defaultValue">The value to set the field default to.</param>
/// <param name="isDefault">The value to set the field default to.</param>
/// <returns>
/// The current builder.
/// </returns>
public SelectMenuOptionBuilder WithDefault(bool defaultValue)
public SelectMenuOptionBuilder WithDefault(bool isDefault)
{
Default = defaultValue;
IsDefault = isDefault;
return this;
}

@@ -1105,7 +1104,7 @@ namespace Discord
/// <returns>The newly built <see cref="SelectMenuOption"/>.</returns>
public SelectMenuOption Build()
{
return new SelectMenuOption(Label, Value, Description, Emote, Default);
return new SelectMenuOption(Label, Value, Description, Emote, IsDefault);
}
}
}

+ 1
- 1
src/Discord.Net.Core/Entities/Interactions/Message Components/MessageComponent.cs View File

@@ -12,7 +12,7 @@ namespace Discord
public class MessageComponent
{
/// <summary>
/// The components to be used in a message.
/// Gets the components to be used in a message.
/// </summary>
public IReadOnlyCollection<ActionRowComponent> Components { get; }



+ 9
- 11
src/Discord.Net.Core/Entities/Interactions/Message Components/SelectMenuComponent.cs View File

@@ -14,35 +14,33 @@ namespace Discord
/// <inheritdoc/>
public ComponentType Type => ComponentType.SelectMenu;

/// <summary>
/// The custom id of this Select menu that will be sent with a <see cref="IDiscordInteraction"/>.
/// </summary>
/// <inheritdoc/>
public string CustomId { get; }

/// <summary>
/// The menus options to select from.
/// Gets the menus options to select from.
/// </summary>
public IReadOnlyCollection<SelectMenuOption> Options { get; }

/// <summary>
/// A custom placeholder text if nothing is selected, max 100 characters.
/// Gets the custom placeholder text if nothing is selected.
/// </summary>
public string Placeholder { get; }

/// <summary>
/// The minimum number of items that must be chosen; default 1, min 0, max 25
/// Gets the minimum number of items that must be chosen.
/// </summary>
public int MinValues { get; }

/// <summary>
/// The maximum number of items that can be chosen; default 1, max 25
/// Gets the maximum number of items that can be chosen.
/// </summary>
public int MaxValues { get; }

/// <summary>
/// Whether this menu is disabled or not.
/// Gets whether this menu is disabled or not.
/// </summary>
public bool Disabled { get; }
public bool IsDisabled { get; }

/// <summary>
/// Turns this select menu into a builder.
@@ -57,7 +55,7 @@ namespace Discord
Placeholder,
MaxValues,
MinValues,
Disabled);
IsDisabled);

internal SelectMenuComponent(string customId, List<SelectMenuOption> options, string placeholder, int minValues, int maxValues, bool disabled)
{
@@ -66,7 +64,7 @@ namespace Discord
Placeholder = placeholder;
MinValues = minValues;
MaxValues = maxValues;
Disabled = disabled;
IsDisabled = disabled;
}
}
}

+ 1
- 1
src/Discord.Net.Rest/API/Common/ButtonComponent.cs View File

@@ -39,7 +39,7 @@ namespace Discord.API
Label = c.Label;
CustomId = c.CustomId;
Url = c.Url;
Disabled = c.Disabled;
Disabled = c.IsDisabled;

if (c.Emote != null)
{


+ 1
- 1
src/Discord.Net.Rest/API/Common/SelectMenuComponent.cs View File

@@ -40,7 +40,7 @@ namespace Discord.API
Placeholder = component.Placeholder;
MinValues = component.MinValues;
MaxValues = component.MaxValues;
Disabled = component.Disabled;
Disabled = component.IsDisabled;
}
}
}

+ 5
- 5
src/Discord.Net.Rest/Discord.Net.Rest.xml View File

@@ -2435,10 +2435,10 @@
<member name="P:Discord.Rest.RestStageChannel.PrivacyLevel">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestStageChannel.DiscoverableDisabled">
<member name="P:Discord.Rest.RestStageChannel.IsDiscoverableDisabled">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestStageChannel.Live">
<member name="P:Discord.Rest.RestStageChannel.IsLive">
<inheritdoc/>
</member>
<member name="M:Discord.Rest.RestStageChannel.ModifyInstanceAsync(System.Action{Discord.StageInstanceProperties},Discord.RequestOptions)">
@@ -2730,10 +2730,10 @@
Represents a thread channel received over REST.
</summary>
</member>
<member name="P:Discord.Rest.RestThreadChannel.Joined">
<member name="P:Discord.Rest.RestThreadChannel.HasJoined">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestThreadChannel.Archived">
<member name="P:Discord.Rest.RestThreadChannel.IsArchived">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestThreadChannel.AutoArchiveDuration">
@@ -2742,7 +2742,7 @@
<member name="P:Discord.Rest.RestThreadChannel.ArchiveTimestamp">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestThreadChannel.Locked">
<member name="P:Discord.Rest.RestThreadChannel.IsLocked">
<inheritdoc/>
</member>
<member name="P:Discord.Rest.RestThreadChannel.MemberCount">


+ 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; }

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

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

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



+ 6
- 6
src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs View File

@@ -16,10 +16,10 @@ namespace Discord.Rest
{
public ThreadType Type { get; private set; }
/// <inheritdoc/>
public bool Joined { get; private set; }
public bool HasJoined { get; private set; }

/// <inheritdoc/>
public bool Archived { get; private set; }
public bool IsArchived { get; private set; }

/// <inheritdoc/>
public ThreadArchiveDuration AutoArchiveDuration { get; private set; }
@@ -28,7 +28,7 @@ namespace Discord.Rest
public DateTimeOffset ArchiveTimestamp { get; private set; }

/// <inheritdoc/>
public bool Locked { get; private set; }
public bool IsLocked { get; private set; }

/// <inheritdoc/>
public int MemberCount { get; private set; }
@@ -58,14 +58,14 @@ namespace Discord.Rest
{
base.Update(model);

Joined = model.ThreadMember.IsSpecified;
HasJoined = model.ThreadMember.IsSpecified;

if (model.ThreadMetadata.IsSpecified)
{
Archived = model.ThreadMetadata.Value.Archived;
IsArchived = model.ThreadMetadata.Value.Archived;
AutoArchiveDuration = model.ThreadMetadata.Value.AutoArchiveDuration;
ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp;
Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
}



+ 5
- 5
src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml View File

@@ -2274,10 +2274,10 @@
<member name="P:Discord.WebSocket.SocketStageChannel.PrivacyLevel">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketStageChannel.DiscoverableDisabled">
<member name="P:Discord.WebSocket.SocketStageChannel.IsDiscoverableDisabled">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketStageChannel.Live">
<member name="P:Discord.WebSocket.SocketStageChannel.IsLive">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketStageChannel.IsSpeaker">
@@ -2610,7 +2610,7 @@
Gets the current users within this thread.
</summary>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.Joined">
<member name="P:Discord.WebSocket.SocketThreadChannel.HasJoined">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.IsPrivateThread">
@@ -2629,7 +2629,7 @@
<member name="P:Discord.WebSocket.SocketThreadChannel.MemberCount">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.Archived">
<member name="P:Discord.WebSocket.SocketThreadChannel.IsArchived">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.ArchiveTimestamp">
@@ -2638,7 +2638,7 @@
<member name="P:Discord.WebSocket.SocketThreadChannel.AutoArchiveDuration">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.Locked">
<member name="P:Discord.WebSocket.SocketThreadChannel.IsLocked">
<inheritdoc/>
</member>
<member name="P:Discord.WebSocket.SocketThreadChannel.Users">


+ 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; }

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

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

/// <summary>
/// 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)
{
Live = isLive;
IsLive = isLive;
if (isLive)
{
Topic = model.Topic;
PrivacyLevel = model.PrivacyLevel;
DiscoverableDisabled = model.DiscoverableDisabled;
IsDiscoverableDisabled = model.DiscoverableDisabled;
}
else
{
Topic = null;
PrivacyLevel = null;
DiscoverableDisabled = null;
IsDiscoverableDisabled = null;
}
}



+ 6
- 6
src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs View File

@@ -35,7 +35,7 @@ namespace Discord.WebSocket
=> Users.FirstOrDefault(x => x.Id == Discord.CurrentUser.Id);

/// <inheritdoc/>
public bool Joined { get; private set; }
public bool HasJoined { get; private set; }

/// <summary>
/// <see langword="true"/> if this thread is private, otherwise <see langword="false"/>
@@ -55,7 +55,7 @@ namespace Discord.WebSocket
public int MemberCount { get; private set; }

/// <inheritdoc/>
public bool Archived { get; private set; }
public bool IsArchived { get; private set; }

/// <inheritdoc/>
public DateTimeOffset ArchiveTimestamp { get; private set; }
@@ -64,7 +64,7 @@ namespace Discord.WebSocket
public ThreadArchiveDuration AutoArchiveDuration { get; private set; }

/// <inheritdoc/>
public bool Locked { get; private set; }
public bool IsLocked { get; private set; }

/// <summary>
/// Gets a collection of cached users within this thread.
@@ -106,10 +106,10 @@ namespace Discord.WebSocket
if (model.ThreadMetadata.IsSpecified)
{
Archived = model.ThreadMetadata.Value.Archived;
IsArchived = model.ThreadMetadata.Value.Archived;
ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp;
AutoArchiveDuration = (ThreadArchiveDuration)model.ThreadMetadata.Value.AutoArchiveDuration;
Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
}

if (model.OwnerId.IsSpecified)
@@ -117,7 +117,7 @@ namespace Discord.WebSocket
Owner = GetUser(model.OwnerId.Value);
}

Joined = model.ThreadMember.IsSpecified;
HasJoined = model.ThreadMember.IsSpecified;
}

internal IReadOnlyCollection<SocketThreadUser> RemoveUsers(ulong[] users)


Loading…
Cancel
Save