Class DiscordApplicationCommandOption
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
Represents a parameter for a DiscordApplicationCommand.
public sealed class DiscordApplicationCommandOption
- Inheritance
-
DiscordApplicationCommandOption
Constructors
- DiscordApplicationCommandOption(string, string, DiscordApplicationCommandOptionType, bool?, IEnumerable<DiscordApplicationCommandOptionChoice>?, IEnumerable<DiscordApplicationCommandOption>?, IEnumerable<DiscordChannelType>?, bool?, object?, object?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?, int?, int?, IReadOnlyList<string>?)
Creates a new instance of a DiscordApplicationCommandOption.
Properties
- AutoComplete
Gets whether this option will auto-complete.
- ChannelTypes
Gets the channel types this command parameter is restricted to, if of type Channel..
- Choices
Gets the optional choices for this command parameter. Not applicable for auto-complete options.
- Description
Gets the description of this command parameter.
- DescriptionLocalizations
Localized descriptions for this option.
- FileTypes
The file types permissible to upload using this component. This takes any dot-prefixed extensions, or one of the following values:
"image": png, gif, jpg, jpeg, jfif, webp, avif,"video": mp4, mov, qt, webm,"audio": mp3, m4a, wav, ogg, opus, flac
Note that the above lists are not set in stone and should not be hardcoded.
- MaxLength
Gets the maximum allowed length for this slash command parameter.
- MaxValue
Gets the maximum value for this slash command parameter.
- MinLength
Gets the minimum allowed length for this slash command parameter.
- MinValue
Gets the minimum value for this slash command parameter.
- Name
Gets the name of this command parameter.
- NameLocalizations
Localized names for this option.
- Options
Gets the optional subcommand parameters for this parameter.
- Required
Gets whether this command parameter is required.
- Type
Gets the type of this command parameter.