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
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 SourceDiscordInteractionOption(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 SourceName
The name of the parameter.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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> |
Type
Value of application command option type.
Declaration
public DiscordApplicationCommandOptionType Type { get; set; }
Property Value
Type | Description |
---|---|
DiscordApplicationCommandOptionType |
Value
The value of the option.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceGetBoolValue()
The System.Boolean value of Value.
Declaration
public bool GetBoolValue()
Returns
Type | Description |
---|---|
System.Boolean |
GetChannelValue()
Declaration
public ulong GetChannelValue()
Returns
Type | Description |
---|---|
System.UInt64 |
GetIntValue()
The System.Int32 value of Value.
Declaration
public int GetIntValue()
Returns
Type | Description |
---|---|
System.Int32 |
GetNumberValue()
The System.Double value of Value.
Declaration
public double GetNumberValue()
Returns
Type | Description |
---|---|
System.Double |
GetRoleValue()
Declaration
public ulong GetRoleValue()
Returns
Type | Description |
---|---|
System.UInt64 |
GetStringValue()
The System.String value of Value.
Declaration
public string GetStringValue()
Returns
Type | Description |
---|---|
System.String |
GetUserValue()
Declaration
public ulong GetUserValue()
Returns
Type | Description |
---|---|
System.UInt64 |
Implements
System.IEquatable<T>