API reference
Method AddDiscordInteractionIngressHandler
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
AddDiscordInteractionIngressHandler<THandler>(IServiceCollection)
Registers a Discord HTTP interactions ingress handler.
public static IServiceCollection AddDiscordInteractionIngressHandler<THandler>(this IServiceCollection services) where THandler : class, IDiscordInteractionIngressHandler
Parameters
servicesIServiceCollectionThe service collection to update.
Returns
- IServiceCollection
The service collection for chaining purposes.
Type Parameters
THandlerThe handler implementation to add.
Remarks
Handlers run in registration order until one returns a non-null response. This enables layered pipelines where specialized handlers can opt out and allow later handlers to try.
Exceptions
- ArgumentNullException
servicesis null.