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
stringThe gateway URL to use for connecting, including any potential reconnects.
activity
DiscordActivityAn 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
ShardInfoIf this isn't the only shard, additional information about this shard.