Skip to content

Commit

Permalink
Got rid of use of undefined variables
Browse files Browse the repository at this point in the history
  • Loading branch information
k-boyle authored and FiniteReality committed Nov 8, 2018
1 parent 419c0a5 commit f9c95bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guides/voice/samples/joining_audio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
public async Task JoinChannel(IVoiceChannel channel = null)
{
// Get the audio channel
channel = channel ?? (msg.Author as IGuildUser)?.VoiceChannel;
if (channel == null) { await msg.Channel.SendMessageAsync("User must be in a voice channel, or a voice channel must be passed as an argument."); return; }
channel = channel ?? (Context.User as IGuildUser)?.VoiceChannel;
if (channel == null) { await Context.Channel.SendMessageAsync("User must be in a voice channel, or a voice channel must be passed as an argument."); return; }

// For the next step with transmitting audio, you would want to pass this Audio Client in to a service.
var audioClient = await channel.ConnectAsync();
Expand Down

0 comments on commit f9c95bc

Please sign in to comment.