Started adding IAudioClient incoming stream creation/destruction events
This commit is contained in:
@@ -5,6 +5,5 @@ namespace Discord.WebSocket
|
||||
{
|
||||
public interface ISocketAudioChannel : IAudioChannel
|
||||
{
|
||||
Task<IAudioClient> ConnectAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +212,9 @@ namespace Discord.WebSocket
|
||||
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
|
||||
=> EnterTypingState(options);
|
||||
|
||||
//IAudioChannel
|
||||
Task<IAudioClient> IAudioChannel.ConnectAsync(Action<IAudioClient> configAction) { throw new NotSupportedException(); }
|
||||
|
||||
//IChannel
|
||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
|
||||
=> Task.FromResult<IUser>(GetUser(id));
|
||||
|
||||
@@ -40,9 +40,9 @@ namespace Discord.WebSocket
|
||||
public Task ModifyAsync(Action<VoiceChannelProperties> func, RequestOptions options = null)
|
||||
=> ChannelHelper.ModifyAsync(this, Discord, func, options);
|
||||
|
||||
public async Task<IAudioClient> ConnectAsync()
|
||||
public async Task<IAudioClient> ConnectAsync(Action<IAudioClient> configAction = null)
|
||||
{
|
||||
return await Guild.ConnectAudioAsync(Id, false, false).ConfigureAwait(false);
|
||||
return await Guild.ConnectAudioAsync(Id, false, false, configAction).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public override SocketGuildUser GetUser(ulong id)
|
||||
|
||||
Reference in New Issue
Block a user