Method ConnectAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
ConnectAsync(DiscordActivity?, UserStatus?, DateTimeOffset?)
Connects to the gateway.
public Task ConnectAsync(DiscordActivity? activity = null, UserStatus? status = null, DateTimeOffset? idlesince = null)
Parameters
activity
DiscordActivityThe activity to set. Defaults to null.
status
UserStatus?The optional status to set. Defaults to null.
idlesince
DateTimeOffset?Since when is the client performing the specified activity. Defaults to null.
Returns
Exceptions
- UnauthorizedException
Thrown when an invalid token was provided.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.