core-hacked / Discondelete

Discord self-bot to delete dm's or purge all messages from a guild.
MIT License
10 stars 6 forks source link
discord message-deletion python self-bot self-bot-discord

Contributors Forks Stargazers Issues MIT License Latest Stable


Logo

Discondelete

Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild.
Named by combining the words "discord", "anaconda", and "delete".
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Python Tested Version

Built With

Getting Started

To get a local copy up and running follow these simple steps.


How to get user token

  1. Open Discord
  2. Press CTRL+SHIFT+I to open the Developer Console
  3. Copy and paste the code below into the console to automatically copy your user token to the clipboard.

    window.webpackChunkdiscord_app.push([
    [Math.random()],
    {},
    req => {
    if (!req.c) {
      console.error('req.c is undefined or null');
      return;
    }
    
    for (const m of Object.keys(req.c)
      .map(x => req.c[x].exports)
      .filter(x => x)) {
      if (m.default && m.default.getToken !== undefined) {
        return copy(m.default.getToken());
      }
      if (m.getToken !== undefined) {
        return copy(m.getToken());
      }
    }
    },
    ]);
    console.log('%cWorked!', 'font-size: 50px');
    console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');

Installation on Linux

Debian-based distros (using APT) ### Prerequisites * Python ```sh sudo apt install python3 ``` * Discord.py ```sh python3 -m pip install -U discord.py ``` * GIT ```sh sudo apt install git ``` ### Installation 1. Clone the repo ```sh git clone https://github.com/core-hacked/Discondelete.git ``` 2. Run the file with python ```sh python3 main.py ```


Fedora / Red Hat (using DNF) ### Prerequisites * Python ```sh sudo dnf install python3 ``` * Discord.py ```sh python3 -m pip install -U discord.py-self ``` * Git ```sh sudo dnf install git-all ``` ### Installation 1. Clone the repo ```sh git clone https://github.com/core-hacked/Discondelete.git ``` 2. Run the file with python ```sh python3 main.py ```


Archlinux (using PacMan) ### Prerequisites * Python ```sh sudo pacman -S python ``` * Discord.py ```sh python3 -m pip install -U discord.py-self ``` * Git ```sh sudo pacman -S git ``` ### Installation 1. Clone the repo ```sh git clone https://github.com/core-hacked/Discondelete.git ``` 2. Run the file with python ```sh python3 main.py ```


Installation on Windows

Windows (using provided installers)
1. Go to [python.org](https://www.python.org/downloads/) and download the latest version of Python (or 3.9.7). 2. Follow the installation wizard and install Python. 3. Go to [git-scm.com](https://git-scm.com/download/win), then download the installer (32-bit or 64-bit). 4. follow the installation wizard and install Git. 5. Open command-prompt or PowerShell and install Discord.py using PIP. ```bat python3 -m pip install -U discord.py-self ``` 6. Clone the repo using git. ```bat git clone https://github.com/core-hacked/Discondelete.git ``` 7. Change directory to the repo and run the file. ```bat cd Discondelete python3 main.py ```


Windows (using WinGet) ### Prerequisites * WinGet
https://docs.microsoft.com/en-us/windows/package-manager/winget/
> ⚠️ The winget command line tool is only supported on Windows 10 1709 (build 16299) or later at this time. * Python ```powershell winget install -e --id Python.Python.3 ``` * Discord.py ```powershell python3 -m pip install -U discord.py-self ``` * Git ```powershell winget install -e --id Git.Git ``` ### Installation 1. Clone the repo ```bat git clone https://github.com/core-hacked/Discondelete.git ``` 2. Run the file with python ```bat python3 main.py ```


Installation on MacOS

MacOS (using Brew) ### Prerequisites * [Brew](https://brew.sh/) ```sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` * Python ```sh brew install python ``` * Discord.py ```sh python3 -m pip install -U discord.py-self ``` * Git ```sh brew install git ``` ### Installation 1. Clone the repo ```sh git clone https://github.com/core-hacked/Discondelete.git ``` 2. Run the file with python ```sh python3 main.py ```


I also highly recommend using Anaconda


Usage

  1. Running the file and passing it a token via the prompt

    python3 main.py
    # Results in 4 prompts for the token, a prefix, a heartbeat timeout and the server purge prefix

    Then in discord type your prefix or the default #DEL or #PS to purge messages from an entire server

  2. Running the file with arguments

    python3 main.py *followed by arguments*
    # arguments: 
    # -t or --token [token] | Specify a token
    # -p or --prefix [prefix] | Specify a prefix (for double word prefix' or ones with special char's use quotes)
    # -b or --heartbeat [int] | Specify the heartbeat timeout 
    # -s or --serverpurge [prefix] | Specify a prefix for a server purge or leave blank for default
    # -o or --output | Specify if you want to output deleted messages in the console
    # -h or --help | to view this in the terminal/console

    Then in discord type your prefix or the default #DEL or #PS to purge messages from an entire server You can also purge a set of messages in a server by adding a number after your prefix.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be... learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This repository is distributed under the MIT License. See LICENSE for more information.

Contact

info@corehacked.com