-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Batch Request Guild Members #709
Support for Batch Request Guild Members #709
Conversation
This is supported by the Discord API and will save requests.
This is backwards compatibility breaking change. I'd suggest adding a new function. |
Updated to eliminate breaking backwards compatibility issue |
wsapi.go
Outdated
type requestGuildMembersData struct { | ||
GuildID []string `json:"guild_id"` | ||
Query string `json:"query"` | ||
Limit int `json:"limit"` | ||
GuildID string `json:"guild_id"` | ||
GuildIDs []string `json:"guild_id"` | ||
Query string `json:"query"` | ||
Limit int `json:"limit"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can leave the struct the same as before so:
type requestGuildMembersData struct {
GuildID []string `json:"guild_id"`
Query string `json:"query"`
Limit int `json:"limit"`
}
And then pass the argument in the original function to the slice.
…o BatchRequestGuildMembers
…o BatchRequestGuildMembers
…o BatchRequestGuildMembers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the PR!
Support for Batch Request Guild Members
Support for Batch Request Guild Members
Support for Batch Request Guild Members
This is supported by the Discord API and will save requests.