Class ChoiceProviderAttribute
Sets a IChoiceProvider for a command options. ChoiceProviders can be used to provide DiscordApplicationCommandOptionChoice from external sources such as a database.
Inheritance
System.Object
System.Attribute
ChoiceProviderAttribute
Namespace: DisCatSharp.ApplicationCommands
Assembly: DisCatSharp.ApplicationCommands.dll
Syntax
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
public class ChoiceProviderAttribute : Attribute
Constructors
| Improve this Doc View SourceChoiceProviderAttribute(Type)
Adds a choice provider to this command.
Declaration
public ChoiceProviderAttribute(Type providerType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | providerType | The type of the provider. |
Properties
| Improve this Doc View SourceProviderType
The type of the provider.
Declaration
public Type ProviderType { get; }
Property Value
Type | Description |
---|---|
System.Type |