A few DNX Core adjustments
This commit is contained in:
@@ -642,12 +642,8 @@ namespace Discord
|
|||||||
case (int)DiscordClientState.Connecting:
|
case (int)DiscordClientState.Connecting:
|
||||||
throw new InvalidOperationException("The client is connecting.");
|
throw new InvalidOperationException("The client is connecting.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DNXCORE50
|
|
||||||
if (checkVoice && !_config.EnableVoice)
|
if (checkVoice && !_config.EnableVoice)
|
||||||
#else
|
|
||||||
if (checkVoice) //Always fail on DNXCORE50
|
|
||||||
#endif
|
|
||||||
throw new InvalidOperationException("Voice is not enabled for this client.");
|
throw new InvalidOperationException("Voice is not enabled for this client.");
|
||||||
}
|
}
|
||||||
private void RaiseEvent(string name, Action action)
|
private void RaiseEvent(string name, Action action)
|
||||||
|
|||||||
@@ -29,9 +29,13 @@ namespace Discord
|
|||||||
private int _voiceBufferLength = 3000;
|
private int _voiceBufferLength = 3000;
|
||||||
|
|
||||||
//Experimental Features
|
//Experimental Features
|
||||||
|
#if !DNXCORE50
|
||||||
/// <summary> (Experimental) Enables the voice websocket and UDP client. This option requires the opus .dll or .so be in the local lib/ folder. </remarks>
|
/// <summary> (Experimental) Enables the voice websocket and UDP client. This option requires the opus .dll or .so be in the local lib/ folder. </remarks>
|
||||||
public bool EnableVoice { get { return _enableVoice; } set { SetValue(ref _enableVoice, value); } }
|
public bool EnableVoice { get { return _enableVoice; } set { SetValue(ref _enableVoice, value); } }
|
||||||
private bool _enableVoice = false;
|
private bool _enableVoice = false;
|
||||||
|
#else
|
||||||
|
internal bool EnableVoice => false;
|
||||||
|
#endif
|
||||||
/// <summary> (Experimental) Enables or disables the internal message queue. This will allow SendMessage to return immediately and handle messages internally. Messages will set the IsQueued and HasFailed properties to show their progress. </summary>
|
/// <summary> (Experimental) Enables or disables the internal message queue. This will allow SendMessage to return immediately and handle messages internally. Messages will set the IsQueued and HasFailed properties to show their progress. </summary>
|
||||||
public bool UseMessageQueue { get { return _useMessageQueue; } set { SetValue(ref _useMessageQueue, value); } }
|
public bool UseMessageQueue { get { return _useMessageQueue; } set { SetValue(ref _useMessageQueue, value); } }
|
||||||
private bool _useMessageQueue = false;
|
private bool _useMessageQueue = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user