Constructor DiscordApplicationCommandOption
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DiscordApplicationCommandOption(string, string, ApplicationCommandOptionType, bool, IEnumerable<DiscordApplicationCommandOptionChoice>?, IEnumerable<DiscordApplicationCommandOption>?, IEnumerable<ChannelType>?, bool, object?, object?, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?, int?, int?)
Creates a new instance of a DiscordApplicationCommandOption.
public DiscordApplicationCommandOption(string name, string description, ApplicationCommandOptionType type, bool required = false, IEnumerable<DiscordApplicationCommandOptionChoice>? choices = null, IEnumerable<DiscordApplicationCommandOption>? options = null, IEnumerable<ChannelType>? channelTypes = null, bool autocomplete = false, object? minimumValue = null, object? maximumValue = null, DiscordApplicationCommandLocalization? nameLocalizations = null, DiscordApplicationCommandLocalization? descriptionLocalizations = null, int? minimumLength = null, int? maximumLength = null)
Parameters
namestringThe name of this parameter.
descriptionstringThe description of the parameter.
typeApplicationCommandOptionTypeThe type of this parameter.
requiredboolWhether the parameter is required.
choicesIEnumerable<DiscordApplicationCommandOptionChoice>The optional choice selection for this parameter.
optionsIEnumerable<DiscordApplicationCommandOption>The optional subcommands for this parameter.
channelTypesIEnumerable<ChannelType>If the option is a channel type, the channels shown will be restricted to these types.
autocompleteboolWhether this option provides autocompletion.
minimumValueobjectThe minimum value for this parameter. Only valid for types Integer or Number.
maximumValueobjectThe maximum value for this parameter. Only valid for types Integer or Number.
nameLocalizationsDiscordApplicationCommandLocalizationThe localizations of the parameter name.
descriptionLocalizationsDiscordApplicationCommandLocalizationThe localizations of the parameter description.
minimumLengthint?The minimum allowed length of the string. (Min 0)
maximumLengthint?The maximum allowed length of the string. (Min 1)