Table of Contents
API reference

Method MapDisCatSharpIngress

Namespace
DisCatSharp.Hosting.AspNetCore
Assembly
DisCatSharp.Hosting.AspNetCore.dll

MapDisCatSharpIngress(IEndpointRouteBuilder)

Maps the default DisCatSharp ingress surface under the configured route prefix.

public static RouteGroupBuilder MapDisCatSharpIngress(this IEndpointRouteBuilder endpoints)

Parameters

endpoints IEndpointRouteBuilder

The endpoint route builder to update.

Returns

RouteGroupBuilder

The configured ingress route group.

Examples

var app = builder.Build();
app.MapDisCatSharpIngress();

Remarks

This convenience method preserves the package's default route composition by mapping the OAuth, interactions, and webhook surfaces beneath RoutePrefix.

The resulting endpoints retain stable names from DiscordIngressEndpointNames and attach DiscordIngressEndpointMetadata so deployment tooling can inspect the logical ingress surface after route groups have been composed.

Exceptions

ArgumentNullException

endpoints is null.

InvalidOperationException

DisCatSharp ASP.NET Core ingress services have not been registered on the application's service provider.