undiscord icon indicating copy to clipboard operation
undiscord copied to clipboard

Ended because API returned an empty page (Fix)

Open overdosing opened this issue 3 years ago • 6 comments

Fixes the problem regarding API returning an empty page

Summary - Since everything is done in chunks of 25, if the system finds 1-25 messages it will delete them. If it finds 0 messages (but total-offset>0) it will increment the offset by 25 to skip the 25 non-deletable messages and recurse. If (total-offset <= 0) then it will still end.

Incrementing the offset by 1 each time is not ideal because you'll still be traversing huge chunks of dead messages.

I had the original problem described above earlier - I've been running this for several hours now and have deleted thousands of messages with no errors and no API-induced slowdowns.

Credit: PinkyLaRue & larryqiann


This change is Reviewable

overdosing avatar Jun 19 '21 23:06 overdosing

funny, i just forked this to write a similar fix for the same issue. merge pl0x!

sintrix avatar Jan 07 '22 18:01 sintrix

Is there a hope that this is fixed?

Wade-BAV avatar Jan 29 '22 23:01 Wade-BAV

I have the same problem and I have about 30,000 messages left to delete. Is this still being worked on?

Assistancepls avatar Feb 05 '22 01:02 Assistancepls

I had this issue just now, reinstalled it & it still seemed bugged, a workaround for this is to set it to delete all messages prior to the one you started having issues with & it'll function just fine.

Wayyllon avatar Mar 10 '22 20:03 Wayyllon

This fix may be a bit overkill, please see PR #323

aijorgenson avatar Mar 14 '22 01:03 aijorgenson

now how to fix this nothing seems to be working

bugsnitch avatar Mar 24 '22 10:03 bugsnitch