Comments (17)
Is this an expected behaviour?
It isn't, it should delete everything it can find on the first run. However, I have some ideas why this might be happening.
Are you using the latest release? And do you see any errors in the output? (pass -v
if you aren't doing so already)
from discord-delete.
INFO[0048] Deleting message 647243810 from channel 647149098
DEBU[0048] DELETE https://discordapp.com/api/v6/channels/647**9098/messages/647**143810
DEBU[0048] Server returned status No Content
DEBU[0048] Skipping context message
DEBU[0048] Skipping context message
INFO[0048] Deleting message 6474855 from channel 647149098
DEBU[0048] DELETE https://discordapp.com/api/v6/channels/6471***98/messages/6472***855
DEBU[0048] Server returned status No Content
DEBU[0048] Skipping context message
DEBU[0048] Skipping context message
INFO[0048] Deleting message 64703 from channel 64719098
DEBU[0048] DELETE https://discordapp.com/api/v6/channels/64718***9098/messages/6472***4803
DEBU[0048] Server returned status Too Many Requests
INFO[0048] Server asked us to sleep for 518 milliseconds
DEBU[0049] DELETE https://discordapp.com/api/v6/channels/6471***9098/messages/647***803
DEBU[0049] Server returned status No Content
DEBU[0049] Skipping context message
DEBU[0049] Skipping context message
INFO[0049] Deleting message 647888 from channel 64775
DEBU[0049] DELETE https://discordapp.com/api/v6/channels/647***875/messages/647***888
DEBU[0049] Server returned status No Content
DEBU[0049] GET https://discordapp.com/api/v6/guilds/643***24/messages/search?author_id=247***0945&include_nsfw=true&offset=0&limit=25
DEBU[0049] Server returned status OK
INFO[0049] No more messages to delete for guild '*********'
larryqian@Larrys-MacBook-Pro Downloads %
This is what it looks like when it ends. No other errors are raised.
I do get "No more messages to delete for $server" messages though.
from discord-delete.
Everything in the log seems normal. There's probably a bug with the message querying algorithm. Question: in the groups that it fails to clear all messages from, are there a lot of calls? Discord actually considers these messages but they have a different numeric type, so the code has to increment an offset when it finds these.
from discord-delete.
The failures are fairly well distributed, and are equally present in servers lacking a voice channel/calls altogether.
from discord-delete.
I'm able to reproduce this issue... it's not looking good. I think Discord have broken the way the program finds messages. Some queries are returning zero results.
Still looking for a solution.
from discord-delete.
Interestingly enough recently the only other Discord deletion app on GitHub also died in a similar way, with errors related to "Got an empty page from the server".
I noticed that on the webUI doing a search in a server for messages you sent sometimes didn't return results either. Clicking "next page" several times always returned results, and seems to just increment the offset by 25 each time. It looks like the search endpoint they are using is /guilds/55...76/messages/66...78/?author....but the official deletion api uses /channels.
from discord-delete.
Yep, their API is completely broken. It's returning empty pages and 500s all the time now. I hope this won't be a problem forever, because it makes this tool unusable. There's no way around it other than brute-force searching, which is only really practical for DMs.
I've just committed c61c770 which might help a bit, but really, the issue is on Discord's side. Not much that I can do. I will leave this issue open and hopefully we'll see them resolve this within the next few weeks.
Thanks for the report as always.
from discord-delete.
It looks like this new commit has resolved the problem and it was able to clear out everything it missed. Thanks!
With that said the way search works is definitely broken on their end. It still says that there are messages remaining and 20 pages, even though none of them are populated in the official app. Maybe it takes them a while to update that index.
from discord-delete.
I fixed this issue and posted a working script to highlight the fix.
The issue is that discord api is returning a positive number of results, but then the messages array is empty. This happens when you delete messages, however discord isnt updating its internal database properly and causes empty messages to be returned that must be skipped.
The solution is to first iterate to get all of the posts, and store them in your own array, then go back and run delete on those message's.
https://github.com/blawar/discordnuke/blob/master/discordnuke.js
from discord-delete.
Thanks, but the solution seems a bit over the top. All you need to do is increment the offset when you find an empty page. This was done in c61c770.
from discord-delete.
hey @cedws i'm getting an error saying level=fatal msg="Error fetching messages for channel: Status code Not Found is unhandled"
now, any idea how to get around this?
from discord-delete.
@zyrodos Happens for me too. It looks like another API update has broken the tool. I'll get back to you when there's a fix.
from discord-delete.
What on earth... search doesn't work in the client either. I think their API is outright broken. Try doing a message search in Discord. Do you see Uh... can you try searching again?
?
from discord-delete.
I am getting the same message when I try to search, yes. Interesting. @cedws
from discord-delete.
I just ran it a few times, and it only removed things from certain channels. It did not remove any DMs.
from discord-delete.
Yeah apparently this is a known ongoing issue. It may be a week or so before the results are fixed.
from discord-delete.
Just pushed release 1.1.5. Discord's backend appears to be fixed, and the API behaviour has reverted to how it was before 1.1.4.
Please upgrade to this release and let me know if you have any problems.
from discord-delete.
Related Issues (20)
- Bans HOT 3
- Ban mitigations HOT 9
- Retain new messages? HOT 5
- Not all messages are being delete HOT 6
- The term "partial" is confusing HOT 9
- Add the ability to skip a channel category using its ID HOT 3
- Add parameter for request delay HOT 2
- how can i completely disable the delete notif in the top right? HOT 2
- Add option to skip pinned messages
- Add feature to delete from all DMs using data request files HOT 11
- What is the correct syntax to specify multiple channels to exclude from deletion? HOT 4
- Error deleting message: Bad status code Bad Request when encountering archived channel messages HOT 2
- Unable to retrieve token from LevelDB HOT 5
- Investigate bulk delete endpoint HOT 1
- go-keychain warning on macOS Ventura HOT 3
- Got my account flagged for phone verication HOT 2
- Add Flag to delete messages from specific channel HOT 1
- Tool reports no more messages to delete for guild while thousands remain HOT 2
- can't make HOT 1
- Allow specific channel deletion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-delete.