Assign a default value to DiscordSocketClient.Status

This property previously had a default value of 'null'. In DiscordSocketClient#ConnectInternalAsync, we would attempt to send a null status to Discord, which would fail to serialize, and force the client to disconnect.
This commit is contained in:
Christopher F
2016-10-22 13:14:36 -04:00
parent 043f8ded85
commit 0b42a2b1b4

View File

@@ -45,7 +45,7 @@ namespace Discord.WebSocket
public ConnectionState ConnectionState { get; private set; }
/// <summary> Gets the estimated round-trip latency, in milliseconds, to the gateway server. </summary>
public int Latency { get; private set; }
internal UserStatus Status { get; private set; }
internal UserStatus Status { get; private set; } = UserStatus.Online;
internal Game? Game { get; private set; }
//From DiscordSocketConfig