Add UseLargeThreshold config option
This commit is contained in:
@@ -38,6 +38,9 @@ namespace Discord
|
|||||||
/// <summary> (Experimental) Enables the voice websocket and UDP client. This option requires the libsodium .dll or .so be in the local lib/ folder. </summary>
|
/// <summary> (Experimental) Enables the voice websocket and UDP client. This option requires the libsodium .dll or .so be in the local lib/ folder. </summary>
|
||||||
public bool EnableVoiceEncryption { get { return _enableVoiceEncryption; } set { SetValue(ref _enableVoiceEncryption, value); } }
|
public bool EnableVoiceEncryption { get { return _enableVoiceEncryption; } set { SetValue(ref _enableVoiceEncryption, value); } }
|
||||||
private bool _enableVoiceEncryption = true;
|
private bool _enableVoiceEncryption = true;
|
||||||
|
/// <summary> (Experimental) Instructs Discord to not send send information about offline users, for servers with more than 50 users. </summary>
|
||||||
|
public bool UseLargeThreshold { get { return _useLargeThreshold; } set { SetValue(ref _useLargeThreshold, value); } }
|
||||||
|
private bool _useLargeThreshold = false;
|
||||||
|
|
||||||
//Internals
|
//Internals
|
||||||
internal bool VoiceOnly { get { return _voiceOnly; } set { SetValue(ref _voiceOnly, value); } }
|
internal bool VoiceOnly { get { return _voiceOnly; } set { SetValue(ref _voiceOnly, value); } }
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ namespace Discord.Net.WebSockets
|
|||||||
LoginCommand msg = new LoginCommand();
|
LoginCommand msg = new LoginCommand();
|
||||||
msg.Payload.Token = token;
|
msg.Payload.Token = token;
|
||||||
msg.Payload.Properties["$device"] = "Discord.Net";
|
msg.Payload.Properties["$device"] = "Discord.Net";
|
||||||
msg.Payload.LargeThreshold = 50;
|
if (_client.Config.UseLargeThreshold)
|
||||||
|
msg.Payload.LargeThreshold = 50;
|
||||||
msg.Payload.Compress = true;
|
msg.Payload.Compress = true;
|
||||||
QueueMessage(msg);
|
QueueMessage(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user