Class ComponentInteractionService<TContext>
- Namespace
- NetCord.Services.ComponentInteractions
- Assembly
- NetCord.Services.dll
public class ComponentInteractionService<TContext> : IComponentInteractionService, IService where TContext : IComponentInteractionContext
Type Parameters
TContext
- Inheritance
-
ComponentInteractionService<TContext>
- Implements
-
- Inherited Members
-
Constructors
ComponentInteractionService(ComponentInteractionServiceConfiguration<TContext>?)
public ComponentInteractionService(ComponentInteractionServiceConfiguration<TContext>? configuration = null)
Parameters
configuration
ComponentInteractionServiceConfiguration<TContext>
Methods
AddInteraction(string, Delegate)
public void AddInteraction(string customId, Delegate handler)
Parameters
customId
string
handler
Delegate
AddModule(Type)
public void AddModule(Type type)
Parameters
type
Type
AddModule<T>()
public void AddModule<T>()
Type Parameters
T
AddModules(Assembly)
public void AddModules(Assembly assembly)
Parameters
assembly
Assembly
ExecuteAsync(TContext, IServiceProvider?)
public ValueTask<IExecutionResult> ExecuteAsync(TContext context, IServiceProvider? serviceProvider = null)
Parameters
context
TContext
serviceProvider
IServiceProvider
Returns
- ValueTask<IExecutionResult>
GetInteractions()
public IReadOnlyDictionary<ReadOnlyMemory<char>, ComponentInteractionInfo<TContext>> GetInteractions()
Returns
- IReadOnlyDictionary<ReadOnlyMemory<char>, ComponentInteractionInfo<TContext>>