Table of Contents

Class GatewayClientOptions

Namespace
DSharpPlus.Net.Gateway
Assembly
DSharpPlus.dll

Controls the behaviour of the default IGatewayClient.

public sealed class GatewayClientOptions
Inheritance
GatewayClientOptions

Properties

GetReconnectionDelay

Specifies a function to get the reconnection delay on a given consecutive attempt to reconnect.

HeartbeatsBeforeReadyThreshold

Specifies the amount of heartbeats to tolerate sending before receiving READY. Once this amount is exceeded, DSharpPlus assumes something has gone wrong and reconnects

HelloEventTimeout

Specifies a timeout for how long we are willing to wait for the HELLO event. If HELLO is not received within that timespan, the shard is forced to reconnect. Defaults to 15 seconds.

Intents

Specifies the gateway intents for this client. The client will only receive events they specified the relevant intents for. Defaults to AllUnprivileged.

LargeThreshold

Specifies the member count at which guilds are considered "large" and the information sent about members is reduced. Defaults to 250.

MaxReconnects

Specifies the maximum amount of reconnects to attempt consecutively. The counter resets if a connection is successfully established. Defaults to MaxValue.

SendingTimeout

Specifies the timeout to use when sending a payload to the gateway and for websocket-level keepalive messages (this is distinct from heartbeating). If this is exceeded, DSharpPlus will attempt to reconnect and resume. Defaults to 5 seconds.

WriteRetryAttempts

Specifies the amount of times a write may be reattempted. This is only invoked if WriteAsync was called during a resume procedure and would have failed as a result of the otherwise transparent resumption. Defaults to 5 attempts.

WriteRetryDelay

Specifies a delay to use when retrying sending a gateway message. This is only invoked if WriteAsync was called during a resume procedure and would have failed as a result of the otherwise transparent resumption. Defaults to 250ms.

ZombiedThreshold

Specifies the amount of heartbeats to let go unanswered before assuming the connection zombied and restarting.