Table of Contents
API reference

Class DiscordWebhookEventDispatcher

Namespace
DisCatSharp.Hosting.AspNetCore.Ingress.WebhookEvents
Assembly
DisCatSharp.Hosting.AspNetCore.dll

Dispatches typed Discord webhook events raised by the ASP.NET Core ingress pipeline.

public sealed class DiscordWebhookEventDispatcher
Inheritance
DiscordWebhookEventDispatcher
Inherited Members

Remarks

The dispatcher stays alongside the webhook envelope, registry, and typed DTOs so the signed webhook feature surface can be discovered from one feature area.

Event dispatch is intentionally fire-and-forget. The HTTP webhook endpoint acknowledges the signed request before async event handlers complete, and each registered handler is subject to a one-second timeout enforced by the underlying AsyncEvent<TSender, TArgs> infrastructure.

Constructors

DiscordWebhookEventDispatcher(IServiceProvider, ILogger<DiscordWebhookEventDispatcher>)

Initializes a new instance of the DiscordWebhookEventDispatcher class.

Properties

HasHandlers

Gets a value indicating whether any webhook event handlers are currently registered.

Events

ApplicationAuthorized

Fired when Discord sends an APPLICATION_AUTHORIZED webhook event.

ApplicationDeauthorized

Fired when Discord sends an APPLICATION_DEAUTHORIZED webhook event.

EntitlementCreated

Fired when Discord sends an ENTITLEMENT_CREATE webhook event.

EntitlementDeleted

Fired when Discord sends an ENTITLEMENT_DELETE webhook event.

EntitlementUpdated

Fired when Discord sends an ENTITLEMENT_UPDATE webhook event.

GameDirectMessageCreated

Fired when Discord sends a GAME_DIRECT_MESSAGE_CREATE webhook event.

GameDirectMessageDeleted

Fired when Discord sends a GAME_DIRECT_MESSAGE_DELETE webhook event.

GameDirectMessageUpdated

Fired when Discord sends a GAME_DIRECT_MESSAGE_UPDATE webhook event.

LobbyMessageCreated

Fired when Discord sends a LOBBY_MESSAGE_CREATE webhook event.

LobbyMessageDeleted

Fired when Discord sends a LOBBY_MESSAGE_DELETE webhook event.

LobbyMessageUpdated

Fired when Discord sends a LOBBY_MESSAGE_UPDATE webhook event.

UnknownWebhookEventReceived

Fired when Discord delivers a signed webhook event that does not yet have a typed event surface.