Skip to content

Fixes for Wipe Archive (index.json) method#722

Open
athaarv wants to merge 3 commits intovictornpb:masterfrom
athaarv:master
Open

Fixes for Wipe Archive (index.json) method#722
athaarv wants to merge 3 commits intovictornpb:masterfrom
athaarv:master

Conversation

@athaarv
Copy link
Copy Markdown

@athaarv athaarv commented Aug 3, 2025

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):

  • Modified the runBatch() function to skip failed jobs instead of halting the process.
  • Replaced the explicit throw in the message deletion logic with a fallback "FAILED" status, allowing the script to move on cleanly.

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

athaarv added 3 commits August 3, 2025 18:20
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant