Skip to content

Commit

Permalink
Update tests and guides
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaZ2 committed Aug 26, 2024
1 parent 8371f4b commit 39b6c5b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions Documentation/guides/advanced/Voice/VoiceModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public async Task PlayAsync(string track)
// Connect
await voiceClient.StartAsync();

// Wait for ready
await voiceClient.ReadyAsync;

// Enter speaking state, to be able to send voice
await voiceClient.EnterSpeakingStateAsync(SpeakingFlags.Microphone);

Expand Down Expand Up @@ -124,9 +121,6 @@ public async Task EchoAsync()
// Connect
await voiceClient.StartAsync();

// Wait for ready
await voiceClient.ReadyAsync;

// Enter speaking state, to be able to send voice
await voiceClient.EnterSpeakingStateAsync(SpeakingFlags.Microphone);

Expand Down
4 changes: 2 additions & 2 deletions Documentation/guides/advanced/voice.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Follow the [installation guide](installing-native-dependencies.md) to install th
> In the following examples streams and @NetCord.Gateway.Voice.VoiceClient instances are not disposed because they should be stored somewhere and disposed later.
### Sending Voice
[!code-cs[VoiceModule.cs](Voice/VoiceModule.cs#L12-L102)]
[!code-cs[VoiceModule.cs](Voice/VoiceModule.cs#L12-L99)]

### Receiving Voice
[!code-cs[VoiceModule.cs](Voice/VoiceModule.cs#L104-L146)]
[!code-cs[VoiceModule.cs](Voice/VoiceModule.cs#L101-L141)]
1 change: 0 additions & 1 deletion Tests/NetCord.Test/ApplicationCommands/VoiceCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private async Task<VoiceClient> JoinAsync(VoiceEncryption encryption, Func<bool,
voiceClient.Disconnect += disconnectHandler;

await voiceClient.StartAsync();
await voiceClient.ReadyAsync;

await voiceClient.EnterSpeakingStateAsync(SpeakingFlags.Microphone);

Expand Down
1 change: 0 additions & 1 deletion Tests/NetCord.Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ private static async Task Main()
manager.AddService(_userCommandService);

await _client.StartAsync();
await _client.ReadyAsync;

//await _client.CloseAsync();

Expand Down

0 comments on commit 39b6c5b

Please sign in to comment.