Fix issues with #984, remove extraneous whitespace (#1051)

- Removed unnecessary parameter in SocketVoiceServer

- Moved SocketVoiceServer into Entities/Voice

- Fixed a bug where trying to download the cached guild would throw

- Fixed a potential bug where Discord might not give us a port when
  connecting to voice
This commit is contained in:
Finite Reality
2018-05-04 11:42:54 +01:00
committed by Christopher F
parent 7cfed7ff67
commit bb4bb13846
2 changed files with 40 additions and 34 deletions

View File

@@ -0,0 +1,21 @@
using System.Diagnostics;
namespace Discord.WebSocket
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class SocketVoiceServer
{
public Cacheable<IGuild, ulong> Guild { get; private set; }
public string Endpoint { get; private set; }
public string Token { get; private set; }
internal SocketVoiceServer(Cacheable<IGuild, ulong> guild, string endpoint, string token)
{
Guild = guild;
Endpoint = endpoint;
Token = token;
}
private string DebuggerDisplay => $"SocketVoiceServer ({Guild.Id})";
}
}