From cf237e4c2541e3d771932cd5e8d462972562289e Mon Sep 17 00:00:00 2001 From: CarsonHoffman Date: Mon, 4 Sep 2017 21:30:22 -0400 Subject: [PATCH] Fixed 404 when calling Session.GuildCreate (#439) --- endpoints.go | 2 ++ restapi.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/endpoints.go b/endpoints.go index b10f958..fe08da5 100644 --- a/endpoints.go +++ b/endpoints.go @@ -122,6 +122,8 @@ var ( EndpointRelationship = func(uID string) string { return EndpointRelationships() + "/" + uID } EndpointRelationshipsMutual = func(uID string) string { return EndpointUsers + uID + "/relationships" } + EndpointGuildCreate = EndpointAPI + "guild" + 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 836e4a4..bffe80e 100644 --- a/restapi.go +++ b/restapi.go @@ -585,7 +585,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 }