API reference
Method MapDiscordInteractionIngress
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
MapDiscordInteractionIngress(IEndpointRouteBuilder)
Maps the DisCatSharp interactions ingress endpoint.
public static RouteGroupBuilder MapDiscordInteractionIngress(this IEndpointRouteBuilder endpoints)
Parameters
endpointsIEndpointRouteBuilderThe endpoint route builder to update.
Returns
- RouteGroupBuilder
The configured interactions route group.
Remarks
The mapped endpoint keeps its stable name and metadata even when composed under a custom route group. Request signatures are validated before the JSON payload is parsed and the registered IDiscordInteractionIngressHandler instances are invoked.
Exceptions
- ArgumentNullException
endpointsis null.- InvalidOperationException
DisCatSharp ASP.NET Core ingress services have not been registered on the application's service provider.