A lightweight way to mass delete old messages

Overview

discord-mass-delete

A quick tool to retroactively delete all messages (or filter to specific channels / guilds), extracted from your Discord data backup.

Usage

git clone [email protected]:l1ving/discord-mass-delete.git
cd discord-mass-delete
make
./mass-delete -h # Run the program with help arguments

Running

  1. Download your Discord data backup. You can get this by going to Discord Settings > Privacy & safety > Request all of my data
  2. Extract the data somewhere. Doesn't matter.
  3. Follow the above usage instructions and run the program from anywhere.
  4. Follow the interactive instructions. You can use the -dir $DIR -dirconfirm args with DIR set to a path to skip the prompts. The -bottoken arg is the only required argument. -channels is a comma separated list of channel IDs.

Example:

./mass-delete -dirconfirm -dir "$DIR" -channels "$FILTER" -bottoken "$TOKEN"

Filtering

There are two possible filter flags: -channels and -guilds. Both are comma separated lists of IDs.

The channels filter takes precedence over guilds. For example, if you specify a channels filter and a channel is not found in the list, it will be skipped. If you specify a guilds filter and a channel is not inside one of the specified guilds, it will also be skipped, regardless of the channel setting.

It is not necessary to use both options if you want to select specific channels inside a guild, as supplying the channels is good enough.

Using a user account instead of a bot account

This program respects Discord's rate limits, so while it is against Discord TOS, you can't really get banned for using it (use user tokens at your own risk, I am not liable).

The first step is required for it to work. Everything afterwards is only something you should do if you are paranoid about your account getting banned.

  • Edit main.go#deleteChannelMessages() to not have Bot inside the Auth header.
  • Add the regular headers that you would get from deleting a message.
    • Press Ctrl+Shift+I
    • Go to the Network tab
    • Delete a message
    • Hit the last request (usually status 204, make sure the Request Method is DELETE)
    • Go to Headers
    • Scroll down to Request Headers
    • Add a line that looks like req.Header.Set("header name", "request value"), for each header
    • Now you can follow the Usage instructions. Use your user token with the -bottoken arg.
You might also like...
UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot
UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot Easy way to get QR and U-code using Utopia API in telegram bot Us

A lightweight, universal OneDrive upload tool for all platforms

简体中文 OneDriveUploader MoeClub wrote a very good version, but unfortunately it's not open source and hasn't been updated in a while. This project is a

A lightweight, universal cloud drive upload tool for all platforms

简体中文 LightUploader MoeClub wrote a very good version, but unfortunately it's not open source and hasn't been updated in a while. This project is a sim

Discordo is a lightweight, secure, and feature-rich Discord terminal client.
Discordo is a lightweight, secure, and feature-rich Discord terminal client.

discordo · [WIP] Discordo is a lightweight, secure, and feature-rich Discord terminal client. It is highly configurable and has a minimalistic user in

A lightweight operating system that allows Discord channels to essentially function as terminal interfaces

KuriOS KuriOS is an lightweight operating system that allows Discord channels to essentially function as terminal interfaces. As such, all permissions

skr: The lightweight and powerful web framework using the new way for Go.Another go the way.
skr: The lightweight and powerful web framework using the new way for Go.Another go the way.

skr Overview Introduction Documents Features Install Quickstart Releases Todo Pull Request Issues Thanks Introduction The lightweight and powerful web

A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).
A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).

proxylogscan This tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and imperson

mass-binding-target is a command line tool for generating binding target list by search plot files from disk.

mass-binding-target mass-binding-target is a command line tool for generating binding target list by search plot files from disk. Build Go 1.13 or new

Mass download all github repositories(public & private) of an organization, ideally in a few seconds.

Git Mass Mass download all github repositories(public & private) of an organization, ideally in a few seconds. Writing this as a simple bash script wo

GoMota - a mass upgrade tool for Tasmota devices.

GoMota GoMota is a mass upgrade tool for Tasmota devices. For each execution, multiple devices on the specified network can be upgraded one version, a

Missa-facil - This site assembles the slides for a Catholic Mass celebration and saves it to your Google Drive according to the music selection A simple way of sending messages from the CLI output to your Discord channel with webhook.
A simple way of sending messages from the CLI output to your Discord channel with webhook.

discat A simple way of sending messages from the CLI output to your Discord channel with webhook. Actually, this is a fork version of slackcat that I

Chesscode - a way of encoding messages using a chess board and the starting set of chess pieces
Chesscode - a way of encoding messages using a chess board and the starting set of chess pieces

chesscode Are you a spy that needs to leave an urgent top secret message for an

Chesscode - Chesscode: a way of encoding messages using a chess board and the starting set of chess pieces
Chesscode - Chesscode: a way of encoding messages using a chess board and the starting set of chess pieces

chesscode Are you a spy that needs to leave an urgent top secret message for an

This is old and unmaintained code, ignore it. starfish is a simple, SDL based, 2D graphics and user input library for Go. If you intend to work on it, please fork from the 'devel' branch, not 'master'. Current release: 0.12.0

What is starfish? What starfish is: starfish is a simple 2D graphics and user input library for Go built on SDL. What starfish is not: While it is bui

godis - an old Redis client for Go

godis Implements a few database clients for Redis. There is a stable client and an experimental client, redis and exp, respectively. To use any of the

A code generator that turns plain old Go services into RPC-enabled (micro)services with robust HTTP APIs.

Frodo Frodo is a code generator and runtime library that helps you write RPC-enabled (micro) services and APIs. It parses the interfaces/structs/comme

A code generator that turns plain old Go services into RPC-enabled (micro)services with robust HTTP APIs.

Frodo is a code generator and runtime library that helps you write RPC-enabled (micro) services and APIs.

Owner
liv
they/them - queer who makes things by breaking them
liv
lightning - forward messages between a qq group and a telegram group

lightning The purpose of this project is to forward messages between a qq group and a telegram group. Getting Started Clone this project: git clone ht

方泓睿 5 Nov 9, 2022
Golang bot that connects to slack using Socketclient to read and write messages.

?? (not)simple go project ?? Golang bot that connects to slack using Socketclient to read and write messages. ?? Use ?? @SquidBot : Mentions your name

Malin J. 1 Aug 23, 2022
Discord bot to find the most liked messages

Emotive Emotive is a discord bot written in Go made for OCM Discord that can tell you the most interesting messages in a channel. These are based on t

Rafael Delos Santos 1 Nov 8, 2021
A Discord bot for downloading attachments from channel messages.

dcdl This is a Discord bot for downloading attachments from channel messages. Setup First, set up a Discord bot application (see here how to do so). N

Ringo Hoffmann 2 May 11, 2022
Notify messages from gcs bucket objects to slack

Notify to Slack Notify message to slack from gcs storage file. Deploy $ gcloud functions deploy notify_to_slack \ --entry-point NotifyToSlack \

Days, Inc. 0 Oct 5, 2021
Notify - Notification microservice for sending templated payloads as Slack messages

Notify Notify is a microservice that takes an event & payload from an applicatio

BritBus 1 May 23, 2022
Client to send messages to channels in Slack.

Slack Client A simple client to send messages to channels in Slack. Example package main import { "fmt" slack "github.com/tommzn/go-slack" }

Tommzn 1 Mar 13, 2022
Bridge Chrome "native messages" to Discord's IPC socket

chrome-discord-bridge This code bridges Chrome "native messages" to Discord's IPC socket. It's written in Go with no third-party dependencies. It's in

Dean Scarff 0 Nov 18, 2022
Tg-channel-api - A JSON API for latest messages of public Telegram channels

Telegram Channel API A JSON API for latest messages of public Telegram channels.

null 5 Oct 27, 2022
Wipe-discord - TUI application to erase Discord messages

wipe-discord Terminal user interface (TUI) application to delete Discord message

null 6 Aug 21, 2022