Skip to main content

DiscordMessageCleaner

PyPI version GitHub Sponsorship

Cleans messages from a Discord channel and its threads when they are older than a set time in days. Threads left empty after cleanup are deleted.

Setup

pip install discord-message-cleaner

🚀 Setting Up & Inviting DeleteBot

  1. Create a Discord Application

  2. Add a Bot User

    • In your application sidebar, select Bot → Add Bot → Yes, do it.
    • Under Privileged Gateway Intents, enable Message Content Intent.
  3. Generate an Invite Link

    • In the sidebar, go to OAuth2 → URL Generator.
    • Under Scopes, check: bot
    • Under Bot Permissions, check at minimum:
      • Read Message History
      • Manage Messages
      • Manage Threads (required to delete empty threads and access archived private threads)
    • Copy the generated URL at the bottom.
  4. Invite to Your Server

    • Paste the URL into your browser, select your server, and authorize.

Run

discord_message_cleaner
  --token=<your_discord_bot_token>
  --channel_id=<your_discord_channel_id>
  --days=<number_of_days>

Docker

docker run -d \
  --name="DiscordMessageCleaner" \
  -e 'TOKEN=<your_discord_bot_token>'
  -e 'CHANNEL_ID=<your_discord_channel_id>'
  -e 'DAYS=<number_of_days>'
  rix1337/docker-discord-message-cleaner:latest

Metadata

Release files for discord-message-cleaner 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discord-message-cleaner 0.1.2
File Size Uploaded Provenance
discord_message_cleaner-0.1.2.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for discord-message-cleaner 0.1.2
File Interpreter ABI Platform
discord_message_cleaner-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / discord_message_cleaner-0.1.2.tar.gz

Download URL discord_message_cleaner-0.1.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f750d1faf66246d1475f2883d9ec673398cbcb44f1f82c4b97277326a24373e9
BLAKE2b-256 checksum
How to use checksums
674d0d001a87b543832166519a00982c58c3c17844f929ba2525a92f2137b952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / discord_message_cleaner-0.1.2-py3-none-any.whl

Download URL discord_message_cleaner-0.1.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2538786be16f3daa6a84e991dc0b9e38f3323d22301cade81aea3ca154bef528
BLAKE2b-256 checksum
How to use checksums
b521e27d16a4eef278a2b841e97a7326ddfe13240688b392646ce9fb3f2c5424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for discord-message-cleaner 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page