diff --git a/src/Discord.Net/DiscordWSClientConfig.cs b/src/Discord.Net/DiscordWSClientConfig.cs index 5a053e8ed..5e8a59d0b 100644 --- a/src/Discord.Net/DiscordWSClientConfig.cs +++ b/src/Discord.Net/DiscordWSClientConfig.cs @@ -38,6 +38,9 @@ namespace Discord /// (Experimental) Enables the voice websocket and UDP client. This option requires the libsodium .dll or .so be in the local lib/ folder. public bool EnableVoiceEncryption { get { return _enableVoiceEncryption; } set { SetValue(ref _enableVoiceEncryption, value); } } private bool _enableVoiceEncryption = true; + /// (Experimental) Instructs Discord to not send send information about offline users, for servers with more than 50 users. + public bool UseLargeThreshold { get { return _useLargeThreshold; } set { SetValue(ref _useLargeThreshold, value); } } + private bool _useLargeThreshold = false; //Internals internal bool VoiceOnly { get { return _voiceOnly; } set { SetValue(ref _voiceOnly, value); } } diff --git a/src/Discord.Net/Net/WebSockets/DataWebSocket.cs b/src/Discord.Net/Net/WebSockets/DataWebSocket.cs index 7723771de..38f8889e6 100644 --- a/src/Discord.Net/Net/WebSockets/DataWebSocket.cs +++ b/src/Discord.Net/Net/WebSockets/DataWebSocket.cs @@ -26,7 +26,8 @@ namespace Discord.Net.WebSockets LoginCommand msg = new LoginCommand(); msg.Payload.Token = token; msg.Payload.Properties["$device"] = "Discord.Net"; - msg.Payload.LargeThreshold = 50; + if (_client.Config.UseLargeThreshold) + msg.Payload.LargeThreshold = 50; msg.Payload.Compress = true; QueueMessage(msg); }