diff --git a/node.go b/node.go index aebb06f..7bcea8f 100644 --- a/node.go +++ b/node.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/valyala/fastjson" "net/http" + "net/url" "strconv" "strings" @@ -261,9 +262,10 @@ func (node *Node) CreatePlayer(guildID string, sessionID string, event VoiceServ // // See the Lavaplayer Source Code for all valid options. func (node *Node) LoadTracks(query string) (*Tracks, error) { - url := fmt.Sprintf("%s/loadtracks?identifier=%s", node.config.REST, query) + v := url.Values{} + v.Set("identifier", query) - req, err := http.NewRequest(http.MethodGet, url, nil) + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/loadtracks?%s", node.config.REST, v.Encode()), nil) if err != nil { return nil, err