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 SourceChoiceAttribute(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. |
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. |
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. |
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 SourceName
Gets the name of the choice
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Value
Gets the value of the choice
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |