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.
This commit is contained in:
Nick Dumas 2017-09-07 16:46:40 -04:00 committed by Chris Rhodes
parent fd8721a522
commit c4a08de525
2 changed files with 1 additions and 2 deletions

View file

@ -71,7 +71,6 @@ var (
EndpointUserNotes = func(uID string) string { return EndpointUsers + "@me/notes/" + uID } EndpointUserNotes = func(uID string) string { return EndpointUsers + "@me/notes/" + uID }
EndpointGuild = func(gID string) string { return EndpointGuilds + gID } 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" } EndpointGuildChannels = func(gID string) string { return EndpointGuilds + gID + "/channels" }
EndpointGuildMembers = func(gID string) string { return EndpointGuilds + gID + "/members" } EndpointGuildMembers = func(gID string) string { return EndpointGuilds + gID + "/members" }
EndpointGuildMember = func(gID, uID string) string { return EndpointGuilds + gID + "/members/" + uID } EndpointGuildMember = func(gID, uID string) string { return EndpointGuilds + gID + "/members/" + uID }

View file

@ -907,7 +907,7 @@ func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel) (err
// GuildInvites returns an array of Invite structures for the given guild // GuildInvites returns an array of Invite structures for the given guild
// guildID : The ID of a Guild. // guildID : The ID of a Guild.
func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) { 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 { if err != nil {
return return
} }