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
name
stringThe name of this parameter.
description
stringThe description of the parameter.
type
ApplicationCommandOptionTypeThe type of this parameter.
required
boolWhether the parameter is required.
choices
IEnumerable<DiscordApplicationCommandOptionChoice>The optional choice selection for this parameter.
options
IEnumerable<DiscordApplicationCommandOption>The optional subcommands for this parameter.
channelTypes
IEnumerable<ChannelType>If the option is a channel type, the channels shown will be restricted to these types.
autocomplete
boolWhether this option provides autocompletion.
minimumValue
objectThe minimum value for this parameter. Only valid for types Integer or Number.
maximumValue
objectThe maximum value for this parameter. Only valid for types Integer or Number.
nameLocalizations
DiscordApplicationCommandLocalizationThe localizations of the parameter name.
descriptionLocalizations
DiscordApplicationCommandLocalizationThe localizations of the parameter description.
minimumLength
int?The minimum allowed length of the string. (Min 0)
maximumLength
int?The maximum allowed length of the string. (Min 1)