Fetch all messages before deleting them #547
Unanswered
MoonlitMonitor
asked this question in
3. Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently what seems to be slowing down the script a lot is that when it searches through the first page of your messages and then deletes those messages, it takes Discord ~30 seconds at most to rebuild the first page hence the "API returned an empty page" issue.
How about fetching all pages of your messages in a given server / channel / DM with some delay, using the offset variable to loop through different pages, storing the IDs of these messages somewhere and then when all of these messages have been detected, the script can begin deleting them?
This would work around the problem of Discord having to constantly rebuild the search database as a result of the script deleting your first page worth of messages before it makes another call to access the first page of messages.
I guess it would work similarly to the "Wipe Archive" mode, except this way you wouldn't need to wait a few days for Discord to send you your data, which is another privacy concern in and of itself.
Beta Was this translation helpful? Give feedback.
All reactions