From 0219fb9901098dd59ee9a863e4bb92791b230c1d Mon Sep 17 00:00:00 2001 From: MistahJ Date: Fri, 25 Oct 2019 01:31:19 -0700 Subject: [PATCH] Support for Batch Request Guild Members This is supported by the Discord API and will save requests. --- wsapi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wsapi.go b/wsapi.go index eccbb9f..f662c2e 100644 --- a/wsapi.go +++ b/wsapi.go @@ -399,7 +399,7 @@ func (s *Session) UpdateStatusComplex(usd UpdateStatusData) (err error) { } type requestGuildMembersData struct { - GuildID string `json:"guild_id"` + GuildID []string `json:"guild_id"` Query string `json:"query"` Limit int `json:"limit"` } @@ -411,10 +411,10 @@ type requestGuildMembersOp struct { // RequestGuildMembers requests guild members from the gateway // The gateway responds with GuildMembersChunk events -// guildID : The ID of the guild to request members of +// guildID : Slice of guild IDs to request members of // query : String that username starts with, leave empty to return all members // limit : Max number of items to return, or 0 to request all members matched -func (s *Session) RequestGuildMembers(guildID, query string, limit int) (err error) { +func (s *Session) RequestGuildMembers(guildID []string, query string, limit int) (err error) { s.log(LogInformational, "called") s.RLock()