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_AUTHORIZEDwebhook event.
- ApplicationDeauthorized
Fired when Discord sends an
APPLICATION_DEAUTHORIZEDwebhook event.
- EntitlementCreated
Fired when Discord sends an
ENTITLEMENT_CREATEwebhook event.
- EntitlementDeleted
Fired when Discord sends an
ENTITLEMENT_DELETEwebhook event.
- EntitlementUpdated
Fired when Discord sends an
ENTITLEMENT_UPDATEwebhook event.
- GameDirectMessageCreated
Fired when Discord sends a
GAME_DIRECT_MESSAGE_CREATEwebhook event.
- GameDirectMessageDeleted
Fired when Discord sends a
GAME_DIRECT_MESSAGE_DELETEwebhook event.
- GameDirectMessageUpdated
Fired when Discord sends a
GAME_DIRECT_MESSAGE_UPDATEwebhook event.
- LobbyMessageCreated
Fired when Discord sends a
LOBBY_MESSAGE_CREATEwebhook event.
- LobbyMessageDeleted
Fired when Discord sends a
LOBBY_MESSAGE_DELETEwebhook event.
- LobbyMessageUpdated
Fired when Discord sends a
LOBBY_MESSAGE_UPDATEwebhook event.
- UnknownWebhookEventReceived
Fired when Discord delivers a signed webhook event that does not yet have a typed event surface.