From 8f1a335d2545bba0adb0035bf6311fc6801529b6 Mon Sep 17 00:00:00 2001 From: Carson Hoffman Date: Sun, 8 Oct 2017 20:54:06 -0400 Subject: [PATCH] Added fix for #437 (#452) --- endpoints.go | 2 ++ restapi.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/endpoints.go b/endpoints.go index 74337ca..335e224 100644 --- a/endpoints.go +++ b/endpoints.go @@ -121,6 +121,8 @@ var ( EndpointRelationship = func(uID string) string { return EndpointRelationships() + "/" + uID } EndpointRelationshipsMutual = func(uID string) string { return EndpointUsers + uID + "/relationships" } + EndpointGuildCreate = EndpointAPI + "guilds" + EndpointInvite = func(iID string) string { return EndpointAPI + "invite/" + iID } EndpointIntegrationsJoin = func(iID string) string { return EndpointAPI + "integrations/" + iID + "/join" } diff --git a/restapi.go b/restapi.go index 9ba59c7..52ca3f6 100644 --- a/restapi.go +++ b/restapi.go @@ -587,7 +587,7 @@ func (s *Session) GuildCreate(name string) (st *Guild, err error) { Name string `json:"name"` }{name} - body, err := s.RequestWithBucketID("POST", EndpointGuilds, data, EndpointGuilds) + body, err := s.RequestWithBucketID("POST", EndpointGuildCreate, data, EndpointGuildCreate) if err != nil { return }