Search Results for

    Show / Hide Table of Contents

    Class DiscordInteractionOption

    Represents a discord Application Command Interaction Data Option Structure API model. Docs: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure

    Inheritance
    System.Object
    DiscordInteractionOption
    Implements
    IDiscordInteractionOption
    System.IEquatable<DiscordInteractionOption>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Rest.Models.Interaction
    Assembly: Color-Chan.Discord.Rest.dll
    Syntax
    public class DiscordInteractionOption : IDiscordInteractionOption, IEquatable<DiscordInteractionOption>

    Constructors

    | Improve this Doc View Source

    DiscordInteractionOption(DiscordInteractionOptionData)

    Initializes a new DiscordInteractionOption

    Declaration
    public DiscordInteractionOption(DiscordInteractionOptionData data)
    Parameters
    Type Name Description
    DiscordInteractionOptionData data

    The data needed to create the DiscordInteractionOption.

    Properties

    | Improve this Doc View Source

    Name

    The name of the parameter.

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

    SubOptions

    Present if this option is a group or subcommand.

    Declaration
    public IEnumerable<IDiscordInteractionOption> SubOptions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordInteractionOption>
    | Improve this Doc View Source

    Type

    Value of application command option type.

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

    Value

    The value of the option.

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

    Methods

    | Improve this Doc View Source

    GetBoolValue()

    The System.Boolean value of Value.

    Declaration
    public bool GetBoolValue()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetChannelValue()

    The Id value of Value.

    Declaration
    public ulong GetChannelValue()
    Returns
    Type Description
    System.UInt64
    | Improve this Doc View Source

    GetIntValue()

    The System.Int32 value of Value.

    Declaration
    public int GetIntValue()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetNumberValue()

    The System.Double value of Value.

    Declaration
    public double GetNumberValue()
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    GetRoleValue()

    The Id value of Value.

    Declaration
    public ulong GetRoleValue()
    Returns
    Type Description
    System.UInt64
    | Improve this Doc View Source

    GetStringValue()

    The System.String value of Value.

    Declaration
    public string GetStringValue()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetUserValue()

    The Id value of Value.

    Declaration
    public ulong GetUserValue()
    Returns
    Type Description
    System.UInt64

    Implements

    IDiscordInteractionOption
    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX