From c4a08de52513a9057d4ebf127a23ba8f4160f8d8 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Thu, 7 Sep 2017 16:46:40 -0400 Subject: [PATCH] Remove a misspelled copy of EndpointGuildInvites. Issue #440 (#441) Reference Issue: https://github.com/bwmarrin/discordgo/issues/440 This endpoint was declard twice in endpoints.go, and used in the GuildInvites() method on Session values. I replaced the misspelled invocation. All tests pass. --- endpoints.go | 1 - restapi.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/endpoints.go b/endpoints.go index b10f958..db91d81 100644 --- a/endpoints.go +++ b/endpoints.go @@ -71,7 +71,6 @@ var ( EndpointUserNotes = func(uID string) string { return EndpointUsers + "@me/notes/" + uID } EndpointGuild = func(gID string) string { return EndpointGuilds + gID } - EndpointGuildInivtes = func(gID string) string { return EndpointGuilds + gID + "/invites" } EndpointGuildChannels = func(gID string) string { return EndpointGuilds + gID + "/channels" } EndpointGuildMembers = func(gID string) string { return EndpointGuilds + gID + "/members" } EndpointGuildMember = func(gID, uID string) string { return EndpointGuilds + gID + "/members/" + uID } diff --git a/restapi.go b/restapi.go index 836e4a4..1a682fa 100644 --- a/restapi.go +++ b/restapi.go @@ -907,7 +907,7 @@ func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel) (err // GuildInvites returns an array of Invite structures for the given guild // guildID : The ID of a Guild. func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildInvites(guildID), nil, EndpointGuildInivtes(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildInvites(guildID), nil, EndpointGuildInvites(guildID)) if err != nil { return }