1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-19 21:32:49 +00:00

Gateway: Potential fix for URL()

This commit is contained in:
diamondburned 2021-04-02 21:55:39 -07:00 committed by diamondburned
parent c9a7ec8122
commit 9925461a25

View file

@ -58,10 +58,12 @@ type SessionStartLimit struct {
func URL() (string, error) { func URL() (string, error) {
var g BotData var g BotData
return g.URL, httputil.NewClient().RequestJSON( c := httputil.NewClient()
&g, "GET", if err := c.RequestJSON(&g, "GET", EndpointGateway); err != nil {
EndpointGateway, return "", err
) }
return g.URL, nil
} }
// BotURL fetches the Gateway URL along with extra metadata. The token // BotURL fetches the Gateway URL along with extra metadata. The token