Table of Contents

Enum GatewayDispatchMode

Namespace
DisCatSharp.Enums
Assembly
DisCatSharp.dll

Specifies how user event handlers are dispatched after ordered internal processing.

public enum GatewayDispatchMode

Fields

ConcurrentHandlers = 0

After internal processing completes for a dispatch event, user event handlers are fired concurrently (fire-and-forget). Multiple events may have their user handlers running at the same time.

This is the default mode and provides the best throughput for most bots.

SequentialHandlers = 1

After internal processing completes for a dispatch event, user event handlers are awaited before the next dispatch event is processed. This fully serializes both internal processing and user handler execution.

Use this mode when your handlers depend on strict event ordering and cannot tolerate overlap.

Remarks

Regardless of the selected mode, internal cache and state mutations are always processed in FIFO order per shard. This setting only controls how user-facing event handlers (Client.MessageCreated += …) are invoked after the internal processing completes.