Coder Social home page Coder Social logo

discord-delete's People

Contributors

cedws avatar evangelions avatar kanouharu avatar mrrfv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

discord-delete's Issues

Write some tests with mock backend

I would like to be able to run some tests to ensure messages are being deleted properly in the partial deletion mode.

I think ideally a mock backend would be written in a way that properly stress tests the partial deletion code. It will need to throw curveballs like 429s, 500s, latency just like the real backend does.

Create releases automatically

I currently build releases on my own machine, which is somewhat acceptable because the binaries are reproducible. But to take some effort out of making new releases, I'd like to have CI automatically create a release when a merge to master is made.

At the moment this repository uses Sourcehut CI (which is very good), but I'm not sure if it has anything built in to create GitHub releases. I can try to find a way to do this in the manifest, or switch to use GitHub Actions.

Rebuild this tool to be user-friendly (extension/GUI application?)

It's evident that a portion of users of this tool aren't developers and often struggle to get it working, which I can completely understand. Having to install Python and the modules is a pain if you don't know what you're doing.

I'm considering rebuilding the tool in a compiled language, and including a GUI to make it easy to use. I'm not sure how I'll do this. My go-to language would be Rust, but it doesn't have any strong GUI libraries currently.

The term "partial" is confusing

I am quite confused by the meaning of "partial" when running this command.

Does it only delete a subset of all your messages so it's "partial"? If it is, I can't find any documentation about it other than skipping channels but that seems unrelated. Otherwise, shouldn't it have a different name?

go-keychain warning on macOS Ventura

# github.com/keybase/go-keychain
cgo-gcc-prolog:53:11: warning: 'SecKeychainItemDelete' is deprecated: first deprecated in macOS 10.10 - SecKeychain is deprecated [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:257:10: note: 'SecKeychainItemDelete' has been explicitly marked deprecated here

keybase/go-keychain#88

Ban mitigations

Following on from discussions in a related project, I am investigating how bans for self-botting could be mitigated. For now, I have implemented UA and super properties spoofing to make the program look more like the official client - I'm waiting to see if this will work.

I suspect that the way Discord's heuristics works is that users with a high number of transactions are subject to special logic which scrutinises requests and checks whether they look like they are coming from the official client.

Got my account flagged for phone verication

Yesterday, when I was using this tool, I got my account flagged for phone verification.

I would request you to either implement a functioning rate limiter or use a library that has rate limiting functionality.
You could also add a parameter for request delay(as described in #40)

Retain new messages?

I've read a bit on the documentation and didn't see any way of accomplishing this.

Is it possible to run this program but retain messages the last X days?

The use case would be to regularly clean up old messages in small batches, which would likely reduce your chance of bans as well.

Help wanted

Hi!

I love the idea of this as i share your concerns about my data.

I have been on a discord server for quite many years now and as I am leaving it I wanted to delete a lot of old personal posts. I just installed this and gave it a try but it seems to me its not actually deleting anything, at least not on the server I am on.

I have had powershell open for a few hours now and it keeps posting lines like:

INFO:root: - 518879316566867970
INFO:root: - 518879285331886082
INFO:root: - 518879261164306443

but when I search for my msgs or check history it doesnt seem like the total number of msgs posted (100k+) changes and the recent msgs I can find still seem to be there. As the script continues, it seems to do SOMETHING, is it fetching IDs to delete them at the end or should they be deleted 1 by 1?

Or is it fetching msgs from old servers I am no longer in and it hasnt even catched up and started with the main server I am currently in right now?

Does it matter if I have discord open in browser or the app while doing this, or that I answered a PM while script running? Would love some help or clarification and can provide with testing feedback. Do you have any discord you are on so I could get in touch with you via PM?

Thank you for your work!

Best regards,
Andy

Supposed Syntax Error On Line 71 When Running Partial

When attempting to run the code in Powershell on Windows, I get a Syntax Error:

python :   File "C:\Users\[user]\Downloads\discord-delete-master\discord_delete.py", line 71
At line:1 char:1
+ python C:\Users\[user]\Downloads\discord-delete-master\discord_delete. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (  File "C:\User...te.py", line 71:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
    async def __aenter__(self):
            ^
SyntaxError: invalid syntax

Implement interactive deletion

At least to my experience, if you receive a "Forbidden" result on a channel, trying to delete any message from that channel will fail in Forbidden.

To speed up the script, the remainder of the channel should be skipped then.

Invalid Syntax Error

When running full deletion;

  File "./discord-delete.py", line 73
    async def __aenter__(self):
            ^
SyntaxError: invalid syntax

I'm on macOS using Python3.

Bans

I have used this application for almost 2 years now, and up until a month ago it was without being banned. In the last month I have been banned twice. Both times were within hours of running the program. Seems discord upd their game and decided to start caring?

eindows.exe file is not recognized.

I am using windows, I have verified my token is correct, and I am using PowerShell to use the commands.

The error message is: /discord-delete-windows.exe : The term '/discord-delete-windows.exe' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1

  • /discord-delete-windows.exe partial
  •   + CategoryInfo          : ObjectNotFound: (/discord-delete-windows.exe:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

Add feature to delete from all DMs using data request files

Hello!
I recently developed this tool, it is for opening all your discord DMs from your discord data folder. Our projects both together can be used for much easier message deletion automation as I have mentioned here

I would like you to mention my tool to your Github repo as this will help both the project and I have personally tried this method and it worked like a charm.

Feature request: skip servers/channels

Request:
Please may a feature be added to skip inputted servers and channels? For example if I wanted to skip deletion of messages in my favourite server I would add the argument -skip "https://discord.com/channels/896848632576878238" or -skip "896848632576878238", 896848632576878238 being the ID of the server located in the address bar. Ideally the same argument could be used to only skip specific channels for example if I wanted to skip my PMs to my best friend I would add the argument -skip "https://discord.com/channels/@me/239683589746734632" or -skip "@me/239683589746734632". If I wanted to skip a single channel in a server instead of skipping the whole server I could use the argument -skip "https://discord.com/channels/435695963835744643/746945884567556432" or -skip "435695963835744643/746945884567556432". Another ideality would be the ability to add multiple servers and channels to the same argument, for example if I wanted to skip my favourite server and my PMs to my best friend I would use the command -skip "https://discord.com/channels/896848632576878238" "https://discord.com/channels/@me/239683589746734632" or -skip "896848632576878238" "@me/239683589746734632".

Thanks for making this awesome tool! It saves me a lot of time and I'm a big fan of automation. If this feature request is unable to be fulfilled that is okay, if I was able to do it myself I would however I'm not a programmer.

Conclusion:

  • Add the ability to skip an entire server by using the CLI argument -skip "https://discord.com/channels/[server ID]" or -skip "[server ID]"
  • Add the ability to skip an entire server channel by using the CLI argument -skip "https://discord.com/channels/[server ID]/[channel ID]" or -skip "[server ID]/[channel ID]"
  • Add the ability to skip entire channel by using the CLI argument -skip "https://discord.com/channels/@me/[channel ID]" or -skip "@me/[channel ID]"
  • Add the ability to use all of the above CLI argument values in one argument for example: -skip "https://discord.com/channels/[server ID]" "https://discord.com/channels/[server ID]/[channel ID]" "https://discord.com/channels/@me/[channel ID]" or -skip "[server ID]" "[server ID]/[channel ID]" "@me/[channel ID]"

Not all messages are being delete

Hello. I've tried using this tool as usual over the past week however it is not deleting all messages. I cannot seem to find anything in common with the messages it doesn't delete however I have plenty left over.

This didn't happen before. I've tried using both the Windows and Linux client and I'm still experiencing the issue.

Error deleting message: Bad status code Bad Request when encountering archived channel messages

Hi,

I am receiving the error as follows:

INFO[0264] Deleting message 8xxxxx from channel 8xxxxxxxx
DEBU[0264] DELETE https://discord.com/api/v8/channels/8xxxxxxx/messages/8xxxxxxxxxx
DEBU[0264] Server returned status Bad Request           
FATA[0264] Error deleting message: Bad status code Bad Request 

When I manually put this channel ID into the web Discord, it shows that the channel name is of an archived thread in a server that has some threads that were auto archived. These are not deletable, even in the UI.

Since this appears to stop the process and block, I am wondering if it would be possible to detect this case and skip the messages, possibly notifying the user of this situation.

Thanks

Extend CLI interface.

The script currently just does a partial and then tries full deletion (if a messages directory exists).

This is for obvious reasons pretty terrible. I would like to extend the script to have partial and full deletion subcommands, along with various other parameters.

I'll probably use argparse for this.

One other thing - the script currently requires being passed a DISCORD_TOKEN variable that will be logged to .bash_history or some equivalent depending on OS/shell. This is not ideal, so I would like to try and find another way for the user to pass this token.

Discord API changes have partially broken message deletion

It looks like many messages are being left behind when running the Go version - I have run it manually several times and each time it finishes with a significant number of messages remaining in threads. I know the tool is hitting them because newer messages are deleted, but there are a lot remaining. Is this an expected behaviour? The Python version worked correctly last I tried it,

Make builds reproducible

I completely forgot that the Go compiler embeds build paths into produced binaries. This means that all the builds I've uploaded so far are not reproducible.

I think most people use Docker to work around this... but I'd rather not take this approach.

Reimplement full deletion.

The full deletion mode which uses data request packages is currently not exposed to the user. I'm waiting on a data request package from Discord so I can reimplement this function and have it automatically extract/search the package.

After this is complete, the script should be suitable for use by others.

Tool reports no more messages to delete for guild while thousands remain

I'm using the latest Windows executable and currently I'm unable to delete my server messages in one go.

The tools deletes on the first run, or after a restart with enough elapsed time, 25 messages from the guild and after that it reports no messages left in the guild and skips to the next. A manual search in Discord shows that this is untrue and thousands of messages still remain in this guild. I have to wait 1 or 2 minutes before restarting the deletion so that Discord has time to repopulate the search results. Without this delay it finds only few messages or none for deletion.

I also observed when I do a manual deletion while searching my messages, it takes some time to update the search results on the first search page and in the meantime it shows no messages at all. If I select the second or third search page it displays my remaining messages just fine.

So currently I'm stuck with stopping and restarting the deletion every few minutes or doing all by hand.

Edit: I already had the same problem 1 month ago, but luckily on that occasion it fixed itself in the following days. So this problem is only sporadic and somehow related to the responsiveness of the Discord search.

Add Flag to delete messages from specific channel

It would be nice to have a way to specify what channels we would like to have deleted rather than having to specify all the channels we want to skip deletion on. Basically the inverse of the skip flag.

Add parameter for request delay

Please may request delay parameters be added? For example --min-delay-seconds and --max-delay-seconds. My thinking is that a random delay between these two values will be generated between each request to Discord and used to set a delay. If Discord is rate limiting us already and the rate limit is shorter than our delay then the new delay should be our delay minis the rate limit.

I believe making very quick requests to Discord rings some alarm bells and flags your account as suspicious forcing the user to attach a phone number to the account. I'd be really cool if I was able to set a custom yet random sleep time between each request to try and mitigate this issue.

Nice app BTW, awesome work!

Unable to retrieve token from LevelDB

Discord have not only moved the session tokens in LevelDB to _https://discord.com\x00\x01tokens, they are now apparently stored using Electron's safeStorage API which encrypts at rest. Not sure yet how to decrypt them but for now auto token retrieval will be broken.

Investigate full deletion functionality.

See #10 (comment).
Full deletion doesn't seem to work as expected. If the script attempts to delete messages from a server the user no longer participates in, it will receive a 403 Forbidden error. I believe this worked in the past but I'm not 100%.
I might have introduced a bug, or perhaps Discord changed their API. If they have, I can try to find another way of implementing full deletion.

Feature Request: Overwrite messages N times before (optionally) deleting

Instead of merely deleting messages, they should first be overwritten N times. The data with which to overwrite the messages should be no shorter in length than that which it replaces and either randomly generated or user-configurable, repeating if necessary to meet the length requirement.

Rationale

There is a very good possibility that when a request to delete a message is made, Discord simply marks that message as deleted and retains the actual message content. By overwriting the message first, we reduce the risk of the message content being retained.

Of course, this measure will fail to achieve our goal if Discord saves the complete edit history. But there is little we can do in that event.

pushing version that allows (white or black)listing servers to not delete and giving the token in the command line directly

hello, sorry this isn't really an issue i really do not know how to use this site. i made a couple changes to the script to suit my needs, choosing what servers not to delete messages on and providing my discord token in the command prompt directly instead of registering a powershell symbol or whatever, and i was wondering if that could interest you. the code added is kinda messy garbage but it does the job and should still work under linux.

thanks so much for making this and i hope you come across a solution to the full deletion 403 problem (thought i doubt it's in your hands)

App stops with "Internal Server Error" every once in a while

The error message is FATA[0002] Error fetching messages for channel: Bad status code Internal Server Error

This has happened with the older non-Go version as well, it looks like. I "fixed" it by wrapping it in a script that called it over and over again non stop, but that isn't an elegant solution.

Thanks

Unable to run the latest release on Ubuntu Desktop 20.04.1

Hello. I'm trying to run this app on my Ubuntu Desktop machine. It is a fully up-to-date install of Ubuntu Desktop 20.04.1. When I attempt to run the app I am thrown this error message: ./discord-delete-linux: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./discord-delete-linux).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.