Table of Contents

Class GatewayClient

Namespace
DSharpPlus.Net.Gateway
Assembly
DSharpPlus.dll

Represents a gateway client handling all system events.

public sealed class GatewayClient : IGatewayClient
Inheritance
object
GatewayClient
Implements

Constructors

GatewayClient(Channel<GatewayPayload>, ITransportService, IOptions<TokenContainer>, IPayloadDecompressor, IOptions<GatewayClientOptions>, IGatewayController, ILoggerFactory)

Properties

IsConnected

Indicates whether this client is connected.

Ping

Indicates the latency between this client and Discord.

ShardId

Gets the shard ID of this client. Defaults to zero if not sharding.

Methods

ConnectAsync(string, DiscordActivity?, DiscordUserStatus?, DateTimeOffset?, ShardInfo?)

Connects this client to the gateway.

DisconnectAsync()

Disconnects from the gateway.

ReconnectAsync()

Reconnects to the gateway.

WriteAsync(byte[])

Sends the provided payload to the gateway.