Merge branch 'master' of https://github.com/RogueException/Discord.Net.git
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Discord.Net.WebSockets
|
|||||||
[JsonProperty(PropertyName = "token")]
|
[JsonProperty(PropertyName = "token")]
|
||||||
public string Token;
|
public string Token;
|
||||||
[JsonProperty(PropertyName = "v")]
|
[JsonProperty(PropertyName = "v")]
|
||||||
public int Version = 2;
|
public int Version = 3;
|
||||||
[JsonProperty(PropertyName = "properties")]
|
[JsonProperty(PropertyName = "properties")]
|
||||||
public Dictionary<string, string> Properties = new Dictionary<string, string>();
|
public Dictionary<string, string> Properties = new Dictionary<string, string>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ namespace Discord.Net.WebSockets
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result.MessageType == WebSocketMessageType.Close)
|
if (result.MessageType == WebSocketMessageType.Close)
|
||||||
throw new Exception($"Got Close Message ({result.CloseStatus?.ToString() ?? "Unexpected"}): {result.CloseStatusDescription ?? "No Reason"}");
|
throw new Exception($"Got Close Message ({result.CloseStatus?.ToString() ?? "Unexpected"}): " +
|
||||||
|
result.CloseStatusDescription != "" ? result.CloseStatusDescription : "No Reason");
|
||||||
else
|
else
|
||||||
builder.Append(Encoding.UTF8.GetString(buffer.Array, buffer.Offset, result.Count));
|
builder.Append(Encoding.UTF8.GetString(buffer.Array, buffer.Offset, result.Count));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user