Fixes for Wipe Archive (index.json) method#722
Open
athaarv wants to merge 3 commits intovictornpb:masterfrom
Open
Fixes for Wipe Archive (index.json) method#722athaarv wants to merge 3 commits intovictornpb:masterfrom
athaarv wants to merge 3 commits intovictornpb:masterfrom
Conversation
…phCoding's solution on issue victornpb#562. The modifications to the code make it so that if an invalid non-existent channel in the json file throws an error, instead of the runBatch function stopping, it skips on to the next item in the json file
…y too many successive requests to empty chats by adding a delay equal to the search delay between each run
… to prevent unnecessary problems with pull request
4 tasks
This was referenced Apr 15, 2026
This was referenced May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem 1:
undiscord crashes when it encounters channel ID's from deleted servers. This makes it hard to complete long batch deletions.
Solution (possible thanks to @yazanzaid00 and @SeraphCoding on #562):
Problem 2: (discovered while testing the fixes above)
While re-running the script on previously interrupted sessions (e.g., chats partially cleared due to API limits), Discord's API begins rate limiting aggressively causing the entire process to fail. This happens because the script sends a burst of successive requests on already-cleared channels, particularly when search results return empty.
Solution:
I added a delay between each batch job to avoid this and reduce the likelihood of hitting Discord’s rate limit. This delay = search delay (configurable via the script interface). This makes re-executions substantially more stable