|
@@ -12,15 +12,15 @@ namespace Discord |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public class SlashCommandBuilder |
|
|
public class SlashCommandBuilder |
|
|
{ |
|
|
{ |
|
|
/// <summary> |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// Returns the maximun length a commands name allowed by Discord |
|
|
/// Returns the maximun length a commands name allowed by Discord |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public const int MaxNameLength = 32; |
|
|
public const int MaxNameLength = 32; |
|
|
/// <summary> |
|
|
|
|
|
/// Returns the maximum length of a commands description allowed by Discord. |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// Returns the maximum length of a commands description allowed by Discord. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public const int MaxDescriptionLength = 100; |
|
|
public const int MaxDescriptionLength = 100; |
|
|
/// <summary> |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// Returns the maximum count of command options allowed by Discord |
|
|
/// Returns the maximum count of command options allowed by Discord |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public const int MaxOptionsCount = 25; |
|
|
public const int MaxOptionsCount = 25; |
|
@@ -382,6 +382,7 @@ namespace Discord |
|
|
/// <param name="description">The description of this option.</param> |
|
|
/// <param name="description">The description of this option.</param> |
|
|
/// <param name="required">If this option is required for this command.</param> |
|
|
/// <param name="required">If this option is required for this command.</param> |
|
|
/// <param name="isDefault">If this option is the default option.</param> |
|
|
/// <param name="isDefault">If this option is the default option.</param> |
|
|
|
|
|
/// <param name="isAutocomplete">If this option supports autocomplete.</param> |
|
|
/// <param name="options">The options of the option to add.</param> |
|
|
/// <param name="options">The options of the option to add.</param> |
|
|
/// <param name="choices">The choices of this option.</param> |
|
|
/// <param name="choices">The choices of this option.</param> |
|
|
/// <returns>The current builder.</returns> |
|
|
/// <returns>The current builder.</returns> |
|
@@ -417,6 +418,7 @@ namespace Discord |
|
|
Description = description, |
|
|
Description = description, |
|
|
Required = required, |
|
|
Required = required, |
|
|
Default = isDefault, |
|
|
Default = isDefault, |
|
|
|
|
|
Autocomplete = isAutocomplete, |
|
|
Options = options, |
|
|
Options = options, |
|
|
Type = type, |
|
|
Type = type, |
|
|
Choices = choices != null ? new List<ApplicationCommandOptionChoiceProperties>(choices) : null, |
|
|
Choices = choices != null ? new List<ApplicationCommandOptionChoiceProperties>(choices) : null, |
|
|