Method ConnectAsync
- Namespace
- DSharpPlus.Net.Gateway
- Assembly
- DSharpPlus.dll
ConnectAsync(string, DiscordActivity?, DiscordUserStatus?, DateTimeOffset?, ShardInfo?)
Connects this client to the gateway.
ValueTask ConnectAsync(string url, DiscordActivity? activity = null, DiscordUserStatus? status = null, DateTimeOffset? idleSince = null, ShardInfo? shardInfo = null)
Parameters
urlstringThe gateway URL to use for connecting, including any potential reconnects.
activityDiscordActivityAn optional activity to send to the gateway when connecting.
statusDiscordUserStatus?An optional status to send to the gateway when connecting.
idleSinceDateTimeOffset?An optional idle timer to send to the gateway when connecting.
shardInfoShardInfoIf this isn't the only shard, additional information about this shard.