Search Results for

    Show / Hide Table of Contents

    Class ChoiceAttribute

    Adds a choice for this slash command option

    Inheritance
    System.Object
    System.Attribute
    ChoiceAttribute
    Namespace: DisCatSharp.ApplicationCommands
    Assembly: DisCatSharp.ApplicationCommands.dll
    Syntax
    [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
    public class ChoiceAttribute : Attribute

    Constructors

    | Improve this Doc View Source

    ChoiceAttribute(String, Double)

    Adds a choice to the slash command option

    Declaration
    public ChoiceAttribute(string name, double value)
    Parameters
    Type Name Description
    System.String name

    The name of the choice.

    System.Double value

    The value of the choice.

    | Improve this Doc View Source

    ChoiceAttribute(String, Int32)

    Adds a choice to the slash command option

    Declaration
    public ChoiceAttribute(string name, int value)
    Parameters
    Type Name Description
    System.String name

    The name of the choice.

    System.Int32 value

    The value of the choice.

    | Improve this Doc View Source

    ChoiceAttribute(String, Int64)

    Adds a choice to the slash command option

    Declaration
    public ChoiceAttribute(string name, long value)
    Parameters
    Type Name Description
    System.String name

    The name of the choice.

    System.Int64 value

    The value of the choice.

    | Improve this Doc View Source

    ChoiceAttribute(String, String)

    Adds a choice to the slash command option

    Declaration
    public ChoiceAttribute(string name, string value)
    Parameters
    Type Name Description
    System.String name

    The name of the choice.

    System.String value

    The value of the choice.

    Properties

    | Improve this Doc View Source

    Name

    Gets the name of the choice

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

    Value

    Gets the value of the choice

    Declaration
    public object Value { get; }
    Property Value
    Type Description
    System.Object

    Extension Methods

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