Search Results for

    Show / Hide Table of Contents

    Class DiscordApplicationCommandOption

    Represents a parameter for a DiscordApplicationCommand.

    Inheritance
    System.Object
    DiscordApplicationCommandOption
    Namespace: DisCatSharp.Entities
    Assembly: DisCatSharp.dll
    Syntax
    public sealed class DiscordApplicationCommandOption

    Constructors

    | Improve this Doc View Source

    DiscordApplicationCommandOption(String, String, ApplicationCommandOptionType, Nullable<Boolean>, IEnumerable<DiscordApplicationCommandOptionChoice>, IEnumerable<DiscordApplicationCommandOption>, IEnumerable<ChannelType>, Nullable<Boolean>, Object, Object, DiscordApplicationCommandLocalization, DiscordApplicationCommandLocalization)

    Creates a new instance of a DiscordApplicationCommandOption.

    Declaration
    public DiscordApplicationCommandOption(string name, string description, ApplicationCommandOptionType type, bool? required = null, IEnumerable<DiscordApplicationCommandOptionChoice> choices = null, IEnumerable<DiscordApplicationCommandOption> options = null, IEnumerable<ChannelType> channelTypes = null, bool? autocomplete = null, object minimumValue = null, object maximumValue = null, DiscordApplicationCommandLocalization nameLocalizations = null, DiscordApplicationCommandLocalization descriptionLocalizations = null)
    Parameters
    Type Name Description
    System.String name

    The name of this parameter.

    System.String description

    The description of the parameter.

    ApplicationCommandOptionType type

    The type of this parameter.

    System.Nullable<System.Boolean> required

    Whether the parameter is required.

    System.Collections.Generic.IEnumerable<DiscordApplicationCommandOptionChoice> choices

    The optional choice selection for this parameter.

    System.Collections.Generic.IEnumerable<DiscordApplicationCommandOption> options

    The optional subcommands for this parameter.

    System.Collections.Generic.IEnumerable<ChannelType> channelTypes

    If the option is a channel type, the channels shown will be restricted to these types.

    System.Nullable<System.Boolean> autocomplete

    Whether this option provides autocompletion.

    System.Object minimumValue

    The minimum value for this parameter. Only valid for types Integer or Number.

    System.Object maximumValue

    The maximum value for this parameter. Only valid for types Integer or Number.

    DiscordApplicationCommandLocalization nameLocalizations

    The localizations of the parameter name.

    DiscordApplicationCommandLocalization descriptionLocalizations

    The localizations of the parameter description.

    Properties

    | Improve this Doc View Source

    AutoComplete

    Gets whether this option provides autocompletion.

    Declaration
    public bool? AutoComplete { get; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>
    | Improve this Doc View Source

    ChannelTypes

    Gets the optional allowed channel types.

    Declaration
    public IReadOnlyCollection<ChannelType> ChannelTypes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<ChannelType>
    | Improve this Doc View Source

    Choices

    Gets the optional choices for this command parameter. Not applicable for auto-complete options.

    Declaration
    public IReadOnlyCollection<DiscordApplicationCommandOptionChoice> Choices { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<DiscordApplicationCommandOptionChoice>
    | Improve this Doc View Source

    Description

    Gets the description of this command parameter.

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    DescriptionLocalizations

    Gets the description localizations.

    Declaration
    public DiscordApplicationCommandLocalization DescriptionLocalizations { get; }
    Property Value
    Type Description
    DiscordApplicationCommandLocalization
    | Improve this Doc View Source

    MaximumValue

    Gets the maximum value for this slash command parameter.

    Declaration
    public object MaximumValue { get; }
    Property Value
    Type Description
    System.Object
    | Improve this Doc View Source

    MinimumValue

    Gets the minimum value for this slash command parameter.

    Declaration
    public object MinimumValue { get; }
    Property Value
    Type Description
    System.Object
    | Improve this Doc View Source

    Name

    Gets the name of this command parameter.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    NameLocalizations

    Gets the name localizations.

    Declaration
    public DiscordApplicationCommandLocalization NameLocalizations { get; }
    Property Value
    Type Description
    DiscordApplicationCommandLocalization
    | Improve this Doc View Source

    Options

    Gets the optional subcommand parameters for this parameter.

    Declaration
    public IReadOnlyCollection<DiscordApplicationCommandOption> Options { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<DiscordApplicationCommandOption>
    | Improve this Doc View Source

    Required

    Gets whether this command parameter is required.

    Declaration
    public bool? Required { get; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>
    | Improve this Doc View Source

    Type

    Gets the type of this command parameter.

    Declaration
    public ApplicationCommandOptionType Type { get; }
    Property Value
    Type Description
    ApplicationCommandOptionType

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems