Table of Contents

Class ShardedGatewayClientOptions

Namespace
NetCord.Hosting.Gateway
Assembly
NetCord.Hosting.dll
public class ShardedGatewayClientOptions : IDiscordOptions
Inheritance
ShardedGatewayClientOptions
Implements
Inherited Members

Constructors

ShardedGatewayClientOptions()

public ShardedGatewayClientOptions()

Properties

Cache

The cache for the GatewayClient. Defaults to GatewayClientCache.

public IGatewayClientCache? Cache { get; set; }

Property Value

IGatewayClientCache

CacheFactory

The cache for the GatewayClient. Defaults to GatewayClientCache.

public Func<Shard, IGatewayClientCache?>? CacheFactory { get; set; }

Property Value

Func<Shard, IGatewayClientCache>

Compression

The compression provider for the GatewayClient. Defaults to ZstandardGatewayCompression if available, otherwise ZLibGatewayCompression.

public IGatewayCompression? Compression { get; set; }

Property Value

IGatewayCompression

CompressionFactory

The compression provider for the GatewayClient. Defaults to ZstandardGatewayCompression if available, otherwise ZLibGatewayCompression.

public Func<Shard, IGatewayCompression?>? CompressionFactory { get; set; }

Property Value

Func<Shard, IGatewayCompression>

ConnectionProperties

The properties for the connection of the GatewayClient. Defaults to null.

public ConnectionPropertiesProperties? ConnectionProperties { get; set; }

Property Value

ConnectionPropertiesProperties

ConnectionPropertiesFactory

The properties for the connection of the GatewayClient. Defaults to null.

public Func<Shard, ConnectionPropertiesProperties?>? ConnectionPropertiesFactory { get; set; }

Property Value

Func<Shard, ConnectionPropertiesProperties>

DefaultPayloadProperties

The default payload properties for WebSocket payloads. Defaults to null.

public WebSocketPayloadProperties? DefaultPayloadProperties { get; set; }

Property Value

WebSocketPayloadProperties

DefaultPayloadPropertiesFactory

The default payload properties for WebSocket payloads. Defaults to null.

public Func<Shard, WebSocketPayloadProperties?>? DefaultPayloadPropertiesFactory { get; set; }

Property Value

Func<Shard, WebSocketPayloadProperties>

Hostname

The hostname to use for the GatewayClient. Defaults to GatewayHostname.

public string? Hostname { get; set; }

Property Value

string

Intents

The intents to use for the GatewayClient. Defaults to AllNonPrivileged.

public GatewayIntents? Intents { get; set; }

Property Value

GatewayIntents?

IntentsFactory

The intents to use for the GatewayClient. Defaults to AllNonPrivileged.

public Func<Shard, GatewayIntents?>? IntentsFactory { get; set; }

Property Value

Func<Shard, GatewayIntents?>

LargeThreshold

The large threshold for the GatewayClient. Value between 50 and 250, total number of guild users where the gateway will stop sending offline guild users in the guild user list. Defaults to 50.

public int? LargeThreshold { get; set; }

Property Value

int?

LargeThresholdFactory

The large threshold for the GatewayClient. Value between 50 and 250, total number of guild users where the gateway will stop sending offline guild users in the guild user list. Defaults to 50.

public Func<Shard, int?>? LargeThresholdFactory { get; set; }

Property Value

Func<Shard, int?>

LatencyTimer

The latency timer for tracking latency of the WebSocket connection. Defaults to LatencyTimer.

public ILatencyTimer? LatencyTimer { get; set; }

Property Value

ILatencyTimer

LatencyTimerFactory

The latency timer for tracking latency of the WebSocket connection. Defaults to LatencyTimer.

public Func<Shard, ILatencyTimer?>? LatencyTimerFactory { get; set; }

Property Value

Func<Shard, ILatencyTimer>

Presence

The presence properties for the GatewayClient. Defaults to null.

public PresenceProperties? Presence { get; set; }

Property Value

PresenceProperties

PresenceFactory

The presence properties for the GatewayClient. Defaults to null.

public Func<Shard, PresenceProperties?>? PresenceFactory { get; set; }

Property Value

Func<Shard, PresenceProperties>

PublicKey

The public key used to validate HTTP interactions.

public string? PublicKey { get; set; }

Property Value

string

RateLimiterProvider

The provider for WebSocket rate limiters. Defaults to GatewayRateLimiterProvider.

public IRateLimiterProvider? RateLimiterProvider { get; set; }

Property Value

IRateLimiterProvider

RateLimiterProviderFactory

The provider for WebSocket rate limiters. Defaults to GatewayRateLimiterProvider.

public Func<Shard, IRateLimiterProvider?>? RateLimiterProviderFactory { get; set; }

Property Value

Func<Shard, IRateLimiterProvider>

ReconnectStrategy

The strategy for reconnecting the WebSocket. Defaults to ReconnectStrategy.

public IReconnectStrategy? ReconnectStrategy { get; set; }

Property Value

IReconnectStrategy

ReconnectStrategyFactory

The strategy for reconnecting the WebSocket. Defaults to ReconnectStrategy.

public Func<Shard, IReconnectStrategy?>? ReconnectStrategyFactory { get; set; }

Property Value

Func<Shard, IReconnectStrategy>

RestClientConfiguration

The configuration for the RestClient at Rest and for each shard at Rest. Defaults to null.

public RestClientConfiguration? RestClientConfiguration { get; set; }

Property Value

RestClientConfiguration

ShardCount

The number of shards to use. If null, the number of shards will be determined by Discord.

public int? ShardCount { get; set; }

Property Value

int?

Token

The token used to authenticate with Discord.

[Required]
public string? Token { get; set; }

Property Value

string

Version

The version of the Discord Gateway to use. Defaults to V10.

public ApiVersion? Version { get; set; }

Property Value

ApiVersion?

VersionFactory

The version of the Discord Gateway to use. Defaults to V10.

public Func<Shard, ApiVersion?>? VersionFactory { get; set; }

Property Value

Func<Shard, ApiVersion?>

WebSocketConnectionProvider

The provider for creating WebSocket connections. Defaults to WebSocketConnectionProvider.

public IWebSocketConnectionProvider? WebSocketConnectionProvider { get; set; }

Property Value

IWebSocketConnectionProvider

WebSocketConnectionProviderFactory

The provider for creating WebSocket connections. Defaults to WebSocketConnectionProvider.

public Func<Shard, IWebSocketConnectionProvider?>? WebSocketConnectionProviderFactory { get; set; }

Property Value

Func<Shard, IWebSocketConnectionProvider>