Class ChoiceProvider
Implementation of IChoiceProvider with access to service collection.
Inheritance
System.Object
ChoiceProvider
Implements
Namespace: DisCatSharp.ApplicationCommands
Assembly: DisCatSharp.ApplicationCommands.dll
Syntax
public abstract class ChoiceProvider : IChoiceProvider
Properties
| Improve this Doc View SourceGuildId
The optional ID of the Guild the command got registered for.
Declaration
public ulong? GuildId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
Services
Sets the service provider.
Declaration
public IServiceProvider Services { get; set; }
Property Value
Type | Description |
---|---|
System.IServiceProvider |
Methods
| Improve this Doc View SourceProvider()
Sets the choices for the slash command.
Declaration
public abstract Task<IEnumerable<DiscordApplicationCommandOptionChoice>> Provider()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<DiscordApplicationCommandOptionChoice>> |