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:
parent
c9a7ec8122
commit
9925461a25
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue