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

Fix bug where process is prematurely stopped due to receiving a full array of skippedMessages #323

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

aijorgenson
Copy link
Contributor

@aijorgenson aijorgenson commented Mar 14, 2022

Sometimes when deleting a large message set (in my specific case over 16k messages), you may populate up to the entire page size with messages that have to be skipped due to invalid type. The message "Ended because API returned an empty page." is displayed to the console, incorrectly informing the user of what actually happened.

If you stop and restart the process, the first page will be filled with messages that have to be skipped. This causes the script to prematurely fail instead of skipping to the next page.

This may possibly also resolve the following in a one line change:

Console output before the fix:
image

Console output after the fix:
image


This change is Reviewable

@victornpb victornpb added the PR looks good Looks like it's good for merging (maybe be in the next release) label Apr 26, 2022
@victornpb victornpb merged commit fa9c674 into victornpb:master Apr 26, 2022
victornpb added a commit that referenced this pull request Apr 29, 2022
Bump Discord API version to version 9 and add more message type to be deleted  PR looks good (#223 by VictorienXP)
Add wildcard subdomain for discord.com match on the userscript (#224 by VictorienXP)
Fix bug where process is prematurely stopped due to receiving a full array of skippedMessages (#323 by aijorgenson)
fix: stricter url matching (#335 by SethFalco)
refactor: reduce number of @matchs (#336 by SethFalco)
Removed duplicate OR operator (#338 by aydinyal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR looks good Looks like it's good for merging (maybe be in the next release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants