Skip to content
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

Add an upper limit to prune and retrievePrunableMemberCount #1118

Merged
merged 5 commits into from
Oct 26, 2019
Merged

Add an upper limit to prune and retrievePrunableMemberCount #1118

merged 5 commits into from
Oct 26, 2019

Conversation

markozajc
Copy link
Contributor

@markozajc markozajc commented Oct 5, 2019

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Adds an upper limit to Guild#prune's and Guild#retrievePrunableMemberCount's days according to Discord API's upper limit of thirty days. This prevents illegal amounts causing 400s by checking if the upper limit is met and throwing if it's not before a REST request can be made.

GuildImpl#retrievePrunableMemberCount will now throw if `days` is above 30.
Documentation of Guild#prune and Guild#retrievePrunableMemberCount now specifies the upper limit of the `days` argument.
@markozajc markozajc changed the title Patch markozajc Add an upper limit to prune and retrievePrunableMemberCount Oct 5, 2019
@kantenkugel kantenkugel changed the base branch from development to hacktoberfest October 5, 2019 17:27
@kantenkugel
Copy link
Collaborator

kantenkugel commented Oct 5, 2019

Switched to hacktoberfest base as this is not urgent enough to trigger a new build right away
Edit: Also helps with squashing those 4 commits xD

@MinnDevelopment MinnDevelopment merged commit 413db7b into discord-jda:hacktoberfest Oct 26, 2019
MinnDevelopment added a commit that referenced this pull request Nov 13, 2019
* Add an upper limit to prune and retrievePrunableMemberCount (#1118)
* Create constant for max slowmode (#1108)
* Improve documentation for reaction pagination
* Updated outdated javadoc comments
* Add some documentation
* Fix description of ChannelAction.setBitrate
* Update bitrate docs on ChannelManager
* Fix single typo
* Fix "Malformed HTML" javadoc task compilation error
* Update CONTRIBUTING.md
@MinnDevelopment MinnDevelopment added this to the v4.1.0 milestone Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants