API reference
Method AddDiscordIncomingWebhookHandler
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
AddDiscordIncomingWebhookHandler<THandler>(IServiceCollection)
Registers a generic incoming webhook ingress handler.
public static IServiceCollection AddDiscordIncomingWebhookHandler<THandler>(this IServiceCollection services) where THandler : class, IDiscordIncomingWebhookHandler
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.
Exceptions
- ArgumentNullException
servicesis null.