|
@@ -355,11 +355,12 @@ namespace Discord.WebSocket |
|
|
Game = new Game(name, streamUrl, streamType); |
|
|
Game = new Game(name, streamUrl, streamType); |
|
|
else |
|
|
else |
|
|
Game = null; |
|
|
Game = null; |
|
|
CurrentUser.Presence = new SocketPresence(Status, Game); |
|
|
|
|
|
await SendStatusAsync().ConfigureAwait(false); |
|
|
await SendStatusAsync().ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
private async Task SendStatusAsync() |
|
|
private async Task SendStatusAsync() |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (ConnectionState != ConnectionState.Connected) |
|
|
|
|
|
throw new InvalidOperationException("Presence data cannot be sent while the client is disconnected."); |
|
|
var game = Game; |
|
|
var game = Game; |
|
|
var status = Status; |
|
|
var status = Status; |
|
|
var statusSince = _statusSince; |
|
|
var statusSince = _statusSince; |
|
|