Class OptionAttribute
Marks this parameter as an option for a slash command
Inheritance
System.Object
System.Attribute
OptionAttribute
Namespace: DisCatSharp.ApplicationCommands
Assembly: DisCatSharp.ApplicationCommands.dll
Syntax
[AttributeUsage(AttributeTargets.Parameter)]
public class OptionAttribute : Attribute
Constructors
| Improve this Doc View SourceOptionAttribute(String, String, Boolean)
Initializes a new instance of the OptionAttribute class.
Declaration
public OptionAttribute(string name, string description, bool autocomplete = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | description | The description. |
System.Boolean | autocomplete | If true, autocomplete. |
Fields
| Improve this Doc View SourceAutocomplete
Whether to autocomplete this option.
Declaration
public bool Autocomplete
Field Value
Type | Description |
---|---|
System.Boolean |
Description
Gets the description of this option.
Declaration
public string Description
Field Value
Type | Description |
---|---|
System.String |
Name
Gets the name of this option.
Declaration
public string Name
Field Value
Type | Description |
---|---|
System.String |