victornpb / undiscord

Undiscord - Delete all messages in a Discord server / channel or DM (Easy and fast) Bulk delete
https://victornpb.github.io/undiscord
MIT License
5.41k stars 724 forks source link

Ended because API returned an empty page. #598

Open Justman100 opened 8 months ago

Justman100 commented 8 months ago

Undiscord Version

v5.2.3

Browser

Mozilla Firefox 123.0

Extension

TamperMonkey

Reproduction steps

  1. Install TemperMonkey
  2. Install script
  3. Let delete messages

Actual results

UnDiscord stopping on 25 deleted messages with the quota:

Ended because API returned an empty page.

After that, one must always wait a little to be able to continue

Expected results

Delete all messages without interruption

Bug affects

Justman100 commented 8 months ago

@victornpb

ugotopia123 commented 7 months ago

I'm getting this exact same issue on Firefox. I thought maybe one of my other extensions was interfering with the script so I did a fresh install of Chrome and only had Tampermonkey installed. Same problem. Dunno why, I'm forced to check in constantly to restart the process.

ugotopia123 commented 7 months ago

Seems to be an API problem. In a related thread someone suggested to set the Search Delay to 60000ms and the Delete Delay to 350ms. So far it seems to be working without stopping prematurely... it just now more than doubled the time it should've taken with a much shorter Search Delay. It appears if there's not enough time between the Search Delay it doesn't pull the next page properly. I'll tamper with gradually reducing the Search Delay to a faster but still stable value cause waiting a whole minute between pages is painful.

dran1x commented 7 months ago

I'm using a 44 second search and a 550ms delete delay, it runs without stopping.

OCircles commented 6 months ago

gm112's fix works.

It seems like fetching pages are a bit inconsistent. Sometimes it works perfectly even on 10s search delay, other times it fails 3 times before working. Failures happen on the default 40s search delay as well.

moralsow commented 6 months ago

I'm very new to GitHub and I'm no coder, so I just have a simple, quick question, for gm112's solution, how do I input the solution/script into my Undiscord? I've been having the same problem of messages not getting deleted after 25 deleted messages with the issue of "ended because api returned an empty page"

Justman100 commented 6 months ago

I'm very new to GitHub and I'm no coder, so I just have a simple, quick question, for gm112's solution, how do I input the solution/script into my Undiscord? I've been having the same problem of messages not getting deleted after 25 deleted messages with the issue of "ended because api returned an empty page"

Navigate into an empty directory and run:

git init
git pull https://github.com/gm112/undiscord
git checkout -B fix/stopping-run-when-messages-remain

yarn
yarn rollup -c

Then replace the content of your current undiscord script with the content of the new file deleteDiscordMessages.user.js

ChettRipley commented 5 months ago

Works, it just auto refreshes when the API fails instead of you having to manually hit DELETE again

keeps it moving, can fail 4-5 times and it still auto searches and picksup fine no issues thanks @gm112