Class AutocompleteAttribute
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Set the IsAutocomplete to true.
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class AutocompleteAttribute : Attribute
- Inheritance
-
AutocompleteAttribute
- Derived
- Inherited Members
Constructors
AutocompleteAttribute()
Set the IsAutocomplete to true without specifying a AutocompleteHandler.
public AutocompleteAttribute()
AutocompleteAttribute(Type)
Set the IsAutocomplete to true and define a AutocompleteHandler to handle Autocomplete interactions targeting the parameter this Attribute is applied to.
public AutocompleteAttribute(Type autocompleteHandlerType)
Parameters
autocompleteHandlerType
Type
Remarks
EnableAutocompleteHandlers must be set to true to use this constructor.
Properties
AutocompleteHandlerType
Type of the AutocompleteHandler.
public Type AutocompleteHandlerType { get; }