Table of Contents

Method ConnectAsync

Namespace
DSharpPlus.Net.Gateway
Assembly
DSharpPlus.dll

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

Connects this client to the gateway.

public ValueTask ConnectAsync(string url, DiscordActivity? activity = null, DiscordUserStatus? status = null, DateTimeOffset? idleSince = null, ShardInfo? shardInfo = null)

Parameters

url string

The gateway URL to use for connecting, including any potential reconnects.

activity DiscordActivity

An optional activity to send to the gateway when connecting.

status DiscordUserStatus?

An optional status to send to the gateway when connecting.

idleSince DateTimeOffset?

An optional idle timer to send to the gateway when connecting.

shardInfo ShardInfo

If this isn't the only shard, additional information about this shard.

Returns

ValueTask