Constructor DiscordApplicationCommandOption
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
DiscordApplicationCommandOption(string, string, DiscordApplicationCommandOptionType, bool?, IEnumerable<DiscordApplicationCommandOptionChoice>, IEnumerable<DiscordApplicationCommandOption>, IEnumerable<DiscordChannelType>, bool?, object, object, IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, string>, int?, int?)
Creates a new instance of a DiscordApplicationCommandOption.
public DiscordApplicationCommandOption(string name, string description, DiscordApplicationCommandOptionType type, bool? required = null, IEnumerable<DiscordApplicationCommandOptionChoice> choices = null, IEnumerable<DiscordApplicationCommandOption> options = null, IEnumerable<DiscordChannelType> channelTypes = null, bool? autocomplete = null, object minValue = null, object maxValue = null, IReadOnlyDictionary<string, string> name_localizations = null, IReadOnlyDictionary<string, string> description_localizations = null, int? minLength = null, int? maxLength = null)
Parameters
namestringThe name of this parameter.
descriptionstringThe description of the parameter.
typeDiscordApplicationCommandOptionTypeThe type of this parameter.
requiredbool?Whether the parameter is required.
choicesIEnumerable<DiscordApplicationCommandOptionChoice>The optional choice selection for this parameter.
optionsIEnumerable<DiscordApplicationCommandOption>The optional subcommands for this parameter.
channelTypesIEnumerable<DiscordChannelType>The channel types to be restricted to for this parameter, if of type Channel.
autocompletebool?Whether this parameter is autocomplete. If true,
choicesmust not be provided.minValueobjectThe minimum value for this parameter. Only valid for types Integer or Number.
maxValueobjectThe maximum value for this parameter. Only valid for types Integer or Number.
name_localizationsIReadOnlyDictionary<string, string>Name localizations for this parameter.
description_localizationsIReadOnlyDictionary<string, string>Description localizations for this parameter.
minLengthint?The minimum allowed length for this parameter. Only valid for type String.
maxLengthint?The maximum allowed length for this parameter. Only valid for type String.