Skip to content

Instantly share code, notes, and snippets.

@Emzi0767
Last active July 7, 2020 18:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Emzi0767/2186c11fdd4c8024ea0412cbab9a6376 to your computer and use it in GitHub Desktop.
Save Emzi0767/2186c11fdd4c8024ea0412cbab9a6376 to your computer and use it in GitHub Desktop.
@transientanima
Copy link

More specifically, you obtain IEnumerable using .GetTracksAsync, and then you use that IEnumerable of LavalinkTracks to obtain a LavalinkTrack. This step confused me, so I figured I'd mention it for other newbs.

@KitsuneDev
Copy link

I think it's worth saying that .ConnectAsync(lavaconfig) can only be called after Connecting your Bot to Discord :)
Otherwise it throws System.NullReferenceException: Object reference not set to an instance of an object.

@1-max-1
Copy link

1-max-1 commented Nov 22, 2019

Huh, LavalinkGuildConnection.Play(LavalinkTrack) says it's playing the song in the logs, but then never actually does send music to the channel.

@cm45
Copy link

cm45 commented Jan 12, 2020

Huh, LavalinkGuildConnection.Play(LavalinkTrack) says it's playing the song in the logs, but then never actually does send music to the channel.

Had this issue as well. Just update Java (IIRC it has to be at least Java 11).

@AndyCarolan9
Copy link

Whenever I run ConnectAsync(lavaConfig) it says unable to connect to remote server and doesn't throw the System.NullReferenceException: Object reference not set to an instance of an object when I run the ConnectAsync(lavaConfig) when I'm not in a voice channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment