-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Issues with <guild>.members.prune() #4834
Comments
While i can not reproduce 0 (which i think is just coincidence) i can reproduce the role parameter being ignored. If i input the same "query" through discords UI the dry run ("this action will prune X members") changes if i add a specific role. If I do the according request with the bot the number stays constant, without taking additional roles into consideration, will investigate shortly |
Not exactly sure, but could this be an issue? |
It's a bit deeper than that: discord.js/src/rest/APIRequest.js Lines 21 to 24 in 56e8ef2
This was introduced in #4143 (9d9e821) by only partially applying provided feedback
while correct, this is also what the client does, despite it not being in spec for the API documentation (though the client by now uses v8, where this might have changed) |
I can "confirm" that it doesn't take count of the roles we pass. I tried to remove all the roles of an afk member, and <guild>.members.prune({dry: true}) returned 1 |
@izexi is writing a fix for the next release |
When will be the next release ^^ ? Or is there a workaround for the moment ? |
Since this is deeply rooted in our request handling there is no work around for this yet but making the raw API call through a normal request (not even the internal methodology, because it's in the query builder). I can not give you an estimate on when the next release will happen, you can watch the pull request to get notified when it's merged (once it's opened github will automatically reference it in this thread) |
its a problem with the code try to run it and tell me the error |
@Starbors Thanks but this is already being solved. And,I don’t have any errors, and if I did, I wouldn’t create an issue for that |
Please describe the problem you are having in as much detail as possible:
When using the prune method, with correct roles ids and the dry option true, it always returns 0
You can see below that I tried to fetch all the members, but it's not the problem ^^.
Include a reproducible code sample here, if possible:
Further details:
Well, i don't really know if the entire prune is broken, or only with the dry option.
Relevant client options:
The text was updated successfully, but these errors were encountered: