Discrub is a lightweight CLI tool for bulk Discord message deletion with customizable search queries.
Ensure the following dependencies are installed:
The program requires a valid options.json
file to run. Ensure the file exists and contains the necessary configuration.
server_id
(string) – The ID of the server to search within.
channel_id
(string) – The ID of the channel to search within.include_nsfw
(boolean) – Include or exclude NSFW content.content
(string) – Search for messages containing specific text.mentions
(string) – Filter messages mentioning a specific user or role.pinned
(boolean) – Filter only pinned messages.delay_ms
(size_t) – Initial delay (in milliseconds) between delete requests. This delay increases exponentially when hitting rate limits.max_id
(string) Search for messages before the specified max_id.
{
"server_id": "123456789012345678",
"channel_id": "987654321098765432",
"include_nsfw": false,
"content": "search keyword",
"mentions": "username.asdf",
"pinned": true,
"delay_ms": 500,
"max_id": "123456789012345678"
}
Once options.json
is set up, build the project with:
make release
The resulting binary will be located at build/discrub
.
Run the executable as needed:
./build/discrub
Contributions are welcome! If you're interested in contributing, please refer to DEVELOPMENT.md for setup and contribution guidelines.
Self-botting violates Discord’s Terms of Service and can result in account termination. Use this script at your own discretion. The author assumes no responsibility for any consequences arising from its use.