Skip to content

Commit

Permalink
Fix error syntax docs
Browse files Browse the repository at this point in the history
because it is List<LavalinkTrack> -> so just .Frist()

Signed-off-by: Truong Hoang <[email protected]>
  • Loading branch information
hqtruong27 authored Aug 13, 2024
1 parent 46905e8 commit ae0deb1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ A shorthand method exists as `GetResultAs<T>`:
LavalinkTrack track = loadResult.LoadType switch {
LavalinkLoadResultType.Track => loadResult.GetResultAs<LavalinkTrack>(),
LavalinkLoadResultType.Playlist => loadResult.GetResultAs<LavalinkPlaylist>().Tracks.First(),
LavalinkLoadResultType.Search => loadResult.GetResultAs<List<LavalinkTrack>>().Tracks.First(),
LavalinkLoadResultType.Search => loadResult.GetResultAs<List<LavalinkTrack>>().First(),
_ => throw new InvalidOperationException("Unexpected load result type.")
};
```
Expand Down

0 comments on commit ae0deb1

Please sign in to comment.